Avahi is ignoring symlinks in /etc/avahi/services/

Bug #1291955 reported by Bruno Nova
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
avahi (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

The files listed in /etc/avahi/services/ are published as services by Avahi to the network (if correct).
However, when a service file is actually a symbolic link to the actual file in another directory, Avahi ignores it and does not publish it (even after a reboot).

For example:
Installing phpmyadmin creates a symbolic link /etc/avahi/services/phpmyadmin.service pointing to ../../phpmyadmin/phpmyadmin.service.
This service isn't listed when executing "avahi-browse -at".
If I replace the symbolic link with the actual file or with a hard link, the service is published correctly.

The problem isn't with the phpmyadmin service, because it also occurs with other services (for example, with the example services in /usr/share/doc/avahi-daemon/examples/).

I'm using Saucy.

ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: avahi-daemon 0.6.31-2ubuntu4.1
ProcVersionSignature: Ubuntu 3.11.0-18.32-generic 3.11.10.4
Uname: Linux 3.11.0-18-generic x86_64
ApportVersion: 2.12.5-0ubuntu2.2
Architecture: amd64
Date: Thu Mar 13 11:46:22 2014
EcryptfsInUse: Yes
InstallationDate: Installed on 2013-11-01 (132 days ago)
InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Release amd64 (20131016.1)
MarkForUpload: True
SourcePackage: avahi
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Bruno Nova (brunonova) wrote :
Revision history for this message
Bruno Nova (brunonova) wrote :

I inspected the /var/log/syslog log.
Some interesting messages:

avahi-daemon[15290]: Successfully called chroot().
avahi-daemon[15290]: Loading service file /services/udisks.service.

So, Avahi is executed in a chroot?
That could explain why symlinks in /etc/avahi/services/ (to outside of /etc/avahi/) don't work.
If I add a link in /etc/avahi/services/ to a service file in ".." (relative path), Avahi publishes the service successfully.

If this is the case, then this isn't a bug (sorry about that :) ).
But a warning should be added to the documentation of Avahi (especially the avahi.service manpage) so this mistake doesn't happen.
And all packages that install Avahi services this way (symlinking) should be corrected (like phpmyadmin).

I'll wait for confirmation.

Revision history for this message
Bruno Nova (brunonova) wrote :

Since this isn't actually a bug in Avahi, I've marked it as invalid.

Changed in avahi (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.