avahi: fix implementation of avahi user

All avahi subpackages should run the daemon as a dedicated user insteead
of as the nobody user. This is helpful in troubleshooting and better for
security and to help avoid resource conflicts.

Build system: x86/64
Build-tested: x86/64-glibc
Run-tested: x86/64-glibc (avahi-dbus-daemon)

Signed-off-by: John Audia <therealgraysky@proton.me>
This commit is contained in:
John Audia
2025-07-15 05:00:41 -04:00
committed by Ted Hess
parent 816a80df2c
commit 9c563686e2

View File

@@ -1,6 +1,4 @@
#
# Copyright (C) 2007-2016 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
@@ -9,14 +7,14 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=avahi
PKG_VERSION:=0.8
PKG_RELEASE:=9
PKG_RELEASE:=10
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/lathiat/avahi/releases/download/v$(PKG_VERSION) \
PKG_SOURCE_URL:=https://github.com/avahi/avahi/releases/download/v$(PKG_VERSION) \
https://avahi.org/download
PKG_HASH:=060309d7a333d38d951bc27598c677af1796934dbd98e1024e7ad8de798fedda
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
PKG_MAINTAINER:=
PKG_LICENSE:=LGPL-2.1-or-later
PKG_LICENSE_FILES:=LICENSE
PKG_CPE_ID:=cpe:/a:avahi:avahi
@@ -67,6 +65,7 @@ define Package/avahi-autoipd
SUBMENU:=IP Addresses and Names
DEPENDS:=+libdaemon
TITLE:=IPv4LL network address configuration daemon
USERID:=avahi=105:avahi=105
endef
define Package/avahi-autoipd/description
@@ -86,6 +85,7 @@ define Package/avahi-dbus-daemon
SUBMENU:=IP Addresses and Names
DEPENDS:=+libavahi-dbus-support +libexpat +librt +libdaemon
TITLE+= (daemon)
USERID:=avahi=105:avahi=105
endef
define Package/avahi-nodbus-daemon
@@ -153,6 +153,7 @@ define Package/avahi-dnsconfd
SUBMENU:=IP Addresses and Names
DEPENDS:=+libavahi +libdaemon +libpthread
TITLE:=A Unicast DNS server using avahi-daemon
USERID:=avahi=105:avahi=105
endef
define Package/avahi-dnsconfd/description
@@ -270,11 +271,11 @@ CONFIGURE_ARGS += \
--disable-tests \
--with-xml=expat \
--with-distro=none \
--with-avahi-user=nobody \
--with-avahi-group=nogroup \
--with-avahi-priv-access-group=nogroup \
--with-autoipd-user=nobody \
--with-autoipd-group=nogroup
--with-avahi-user=avahi \
--with-avahi-group=avahi \
--with-avahi-priv-access-group=avahi \
--with-autoipd-user=avahi \
--with-autoipd-group=avahi
ifeq ($(BUILD_VARIANT),dbus)
CONFIGURE_ARGS += \