ports/163529: [patch] net/avahi-autoipd and net/avahi-libdns GIDs collide with Samba WKRID

Anthony Chavez acc at hexadecagram.org
Thu Dec 22 11:30:14 UTC 2011


>Number:         163529
>Category:       ports
>Synopsis:       [patch] net/avahi-autoipd and net/avahi-libdns GIDs collide with Samba WKRID
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Dec 22 11:30:14 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Anthony Chavez
>Release:        8.2-STABLE
>Organization:
>Environment:
FreeBSD metis.hexadecagram.org 8.2-STABLE FreeBSD 8.2-STABLE #0: Thu Nov 10 16:13:27 MST 2011 root at metis.hexadecagram.org:/usr/obj/usr/src/sys/METIS i386
>Description:
Similarly to ports/105122, the GID chosen for the avahi-autoipd group (546) is the same as the Samba well-known RID for the local Guests group, as described here:

http://samba.org/samba/docs/man/Samba-HOWTO-Collection/groupmapping.html#WKURIDS

>How-To-Repeat:
sudo portmaster net/avahi-autoipd
>Fix:
The patch attached to this PR addresses the issue in both ports, and I will be submitting a separate PR to address the issue of reserving well-known user default RIDs so that this problem can be avoided in the future.

It should be noted in both PRs that with the exception of 3 UIDs, it is only GIDs that should be reserved.  Also, having equivalent UIDs and GIDs is not strictly necessary, and seems to be done purely for aesthetics in most cases.  My patch carries on this convention.

Also, both ports create and use the same user (avahi-autoipd) with the same UID.  It's assumed that this is intentional, but the pkg-install scripts differ in that the user is given a different GECOS name depending on which port is installed.  I've taken the liberty of correcting this as well.


Patch attached with submission follows:

--- GIDs.orig	2011-11-19 00:05:21.000000000 -0700
+++ GIDs	2011-12-22 03:56:00.000000000 -0700
@@ -164,6 +164,7 @@
 pulse:*:563:
 pulse-access:*:564:
 assp:*:587:
+avahi-autoipd:*:588:
 _xsi:*:600:
 _tss:*:601:_tss
 _pkcs11:*:602:_pkcs11
--- net/avahi-autoipd/pkg-install.orig	2007-10-24 17:37:23.000000000 -0600
+++ net/avahi-autoipd/pkg-install	2011-12-22 04:10:00.000000000 -0700
@@ -4,7 +4,7 @@
 POST-INSTALL)
 	USER=avahi-autoipd
 	GROUP=${USER}
-	UID=546
+	UID=588
 	GID=${UID}
 	PW=/usr/sbin/pw
 
@@ -23,7 +23,7 @@
 		echo "You already have a user \"${USER}\", so I will use it."
 	else
 		if ${PW} useradd ${USER} -u ${UID} -g ${GROUP} -h - \
-			-d "/nonexistent" -s /sbin/nologin -c "Avahi Autoipd Daemon User"
+			-d "/nonexistent" -s /sbin/nologin -c "Avahi Daemon User"
 		then
 			echo "Added user \"${USER}\"."
 		else
--- net/avahi-libdns/pkg-install.orig	2007-10-24 17:37:24.000000000 -0600
+++ net/avahi-libdns/pkg-install	2011-12-22 03:55:56.000000000 -0700
@@ -4,7 +4,7 @@
 POST-INSTALL)
 	USER=avahi-autoipd
 	GROUP=${USER}
-	UID=546
+	UID=588
 	GID=${UID}
 	PW=/usr/sbin/pw
 


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list