Repository navigation
fix(avahi): let avahi-daemon enter its SELinux domain - #549
Conversation
avahi-daemon could not start on Utah, so *.local names never resolved (projectbluefin#443: `ssh host.local` -> "Temporary failure in name resolution"; failed avahi-daemon.service and .socket). On a booted testing-20261001-41873b5: avc: denied { nnp_transition } scontext=init_t tcontext=avahi_t avc: denied { create } comm="avahi-daemon" ... tcontext=avahi_var_run_t avahi-daemon.service: Main process exited, status=255 Hummingbird's avahi 0.9~rc4 unit sets NoNewPrivileges=yes, and the targeted policy grants no init_t -> avahi_t nnp_transition, so the daemon stayed in init_t and failed writing its pid file. (The earlier theory in the issue, pid-directory ownership, was the symptom, not the cause.) Fedora's unit does not set NNP. Drop it with a unit drop-in; avahi_t stays SELinux-confined. Verified on the VM: with the drop-in, avahi-daemon is active as avahi_t, no AVC denials, and `getent hosts utah-pub.local` resolves. Enabling the units by default is projectbluefin#387 / projectbluefin#411. Assisted-by: Claude Opus 5.5 via Claude Code Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
security (info, in-scope)
system_files/shared/usr/lib/systemd/system/avahi-daemon.service.d/10-utah-selinux.conf:16 — NoNewPrivileges=no is a deliberate posture trade: upstream's unit (avahi-daemon.service.in) pairs NNP with SystemCallFilter=/RestrictSUIDSGID=/LockPersonality=, which stay in force because PID 1 holds CAP_SYS_ADMIN (systemd only re-implies NNP for unprivileged managers), and the process gains avahi_t confinement it lacked in init_t. Net gain, but the proper long-term fix is the policy grant (init_nnp_daemon_domain(avahi_t)) the drop-in comment already names (lines 13-14); consider tracking that removal as an issue so the drop-in doesn't outlive the policy fix.
No findings from: correctness, intent-alignment, style, docs-currency.
Confidence: 5/5 (safe)
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
Utah shipped Avahi and switcheroo-control but left them disabled. Enable avahi-daemon.service/.socket and switcheroo-control.service in configure-services.sh and the desktop preset, install the avahi daemon package, and require the units in the desktop contract (projectbluefin#387, projectbluefin#104). Rebased onto main after projectbluefin#547 (package counts) and projectbluefin#549 (avahi SELinux drop-in, which this needs for the daemon to start). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Utah shipped Avahi and switcheroo-control but left them disabled. Enable avahi-daemon.service/.socket and switcheroo-control.service in configure-services.sh and the desktop preset, install the avahi daemon package, and require the units in the desktop contract (#387, #104). Rebased onto main after #547 (package counts) and #549 (avahi SELinux drop-in, which this needs for the daemon to start). Co-authored-by: castrojo <castrojo@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
avahi-daemon could not start on Utah, so *.local names never resolved
(#443:
ssh host.local-> "Temporary failure in name resolution"; failedavahi-daemon.service and .socket). On a booted testing-20261001-41873b5:
Hummingbird's avahi 0.9~rc4 unit sets NoNewPrivileges=yes, and the targeted
policy grants no init_t -> avahi_t nnp_transition, so the daemon stayed in
init_t and failed writing its pid file. (The earlier theory in the issue,
pid-directory ownership, was the symptom, not the cause.) Fedora's unit does
not set NNP. Drop it with a unit drop-in; avahi_t stays SELinux-confined.
Verified on the VM: with the drop-in, avahi-daemon is active as avahi_t,
no AVC denials, and
getent hosts utah-pub.localresolves. Enabling theunits by default is #387 / #411.
Part of #443 (the units still need enabling: #387 / #411).
Found and verified by booting the published
testing-20261001-41873b5image (and the published live ISO) on KubeVirt via corral, then an integration build of all ten fixes. Each fix was checked on a booted VM (viabootc usr-overlayor/etcoverrides first, then in the rebuilt image).just checkpasses on this branch.🤖 Generated with Claude Code