KubuntuEasyZeroconf

Differences between revisions 4 and 5
Revision 4 as of 2006-06-22 08:09:30
Size: 2925
Editor: ALagny-109-1-10-249
Comment:
Revision 5 as of 2006-06-22 09:25:35
Size: 2943
Editor: ALagny-109-1-10-249
Comment:
Deletions are marked like this. Additions are marked like this.
Line 38: Line 38:
 1. The current KControl module for zeroconf support has a checkbox to enable/disable the kde zeroconf stack. This kcontrol module should be patched to also act on the {{{/etc/default/avahi-daemon}}} file to enable/disable Avahi starting on boot (using kdesu).  1. The current KControl module for zeroconf support has a checkbox to enable/disable the KDE Zeroconf stack. This KControl module should be patched so it first enables Avahi in {{{/etc/default/avahi-daemon}}} and if that succeeds it enables it in KDE.
Line 40: Line 40:
 1. Patch the ioslave and the kdelibs zeroconf support so that when the user access the ioslave, or when an application tries to expose a service while zeroconf is disabled we popup a dialog like the following one:  1. Patch the ioslave so that when the user access the ioslave, or when an application tries to expose a service while zeroconf is disabled we popup a dialog like the following one:
Line 48: Line 48:
If the user answers "yes", avahi is started (using kdesu) and the kde zeroconf stack is activated on success. If the "forever" checkbox is checked, we also put {{{ENABLED_ON_BOOT=1}}} in the {{{/etc/default/avahi-daemon}}} file. If the user answers "yes", Avahi is started for this session (using kdesu) and the KDE Zeroconf stack is activated on success. If the "forever" checkbox is checked, we also put {{{ENABLED_ON_BOOT=1}}} in the {{{/etc/default/avahi-daemon}}} file.
Line 50: Line 50:
=== Code === == Code ==
Line 52: Line 52:
Create a script /usr/share/avahi/enable_browsing with equivalent functionality /usr/share/cups/enable_browsing: it would edit /etc/default/avahi-daemon to change ENABLED_ON_BOOT. This script would be challed when the user ticks Enable Zeroconf. Create a script /usr/share/avahi/enable_browsing with equivalent functionality /usr/share/cups/enable_browsing: it would edit /etc/default/avahi-daemon to change ENABLED_ON_BOOT and reload the settings of the Avahi daemon. This script would be challed when the user ticks Enable Zeroconf.

Summary

Provide an easy way to turn on Zeroconf in Kubuntu

Rationale

Zeroconf is turned off by default for security reasons, we should provide an easy way to turn it on.

Use cases

Jack wants to avoid to make any ad hoc configuration to access his network services at home.

Alice is going to several conferences and wants to easily discover the available services or expose services. But, she doesn't want zeroconf to keep running forever for security reasons.

Scope

Zeroconf in this spec refers to the dnssd protocol implemented with Avahi.

Currently Avahi is not installed on the system. Users have to locate the relevant package and install it to make Zeroconf works. To make sure it's not running anymore they have to uninstall it.

Design

KDE has already a Zeroconf stack able to use Avahi in kdelibs, a ioslave allowing to browse services available, and a KControl module to configure of the Zeroconf stack. We will create the necessary facilities to enable Avahi on demand so that it can be installed by default but inactive, this way the system would stay secure by default while not hampering the user experience.

Implementation

  1. Introduce /etc/default/avahi-daemon file holding an ENABLED_ON_BOOT key, the value will be 0 by default. The /etc/init.d/avahi-daemon would start avahi on boot only when ENABLED_ON_BOOT=1.

  2. Patch kdelibs package so that the KDE Zeroonf stack is disabled by default.
  3. The current KControl module for zeroconf support has a checkbox to enable/disable the KDE Zeroconf stack. This KControl module should be patched so it first enables Avahi in /etc/default/avahi-daemon and if that succeeds it enables it in KDE.

  4. Patch the ioslave so that when the user access the ioslave, or when an application tries to expose a service while zeroconf is disabled we popup a dialog like the following one:

--------------------
| Enable Zeroconf? |
| [ ] Forever      |
|   [Yes] [No]     |
--------------------

If the user answers "yes", Avahi is started for this session (using kdesu) and the KDE Zeroconf stack is activated on success. If the "forever" checkbox is checked, we also put ENABLED_ON_BOOT=1 in the /etc/default/avahi-daemon file.

Code

Create a script /usr/share/avahi/enable_browsing with equivalent functionality /usr/share/cups/enable_browsing: it would edit /etc/default/avahi-daemon to change ENABLED_ON_BOOT and reload the settings of the Avahi daemon. This script would be challed when the user ticks Enable Zeroconf.


CategorySpec

KubuntuEasyZeroconf (last edited 2008-09-12 02:07:24 by HSI-KBW-091-089-037-065)