ports/86980: The clamav port uses a fixed GID
Stephane Bortzmeyer
bortzmeyer at generic-nic.net
Thu Oct 6 10:30:21 UTC 2005
>Number: 86980
>Category: ports
>Synopsis: The clamav port uses a fixed GID
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Oct 06 10:30:19 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Stephane Bortzmeyer
>Release: FreeBSD 5.4-RELEASE i386
>Organization:
AFNIC
>Environment:
System: FreeBSD esther.generic-nic.net 5.4-RELEASE FreeBSD 5.4-RELEASE #0: Sun May 8 10:21:06 UTC 2005 root at harlow.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386
>Description:
The clamav port (/usr/ports/security/clamav) uses a fixed GID
(106, hardwired in files/pkg-install.in) without any sensible
reason. This prevents me from installing it, since I already
have such a group.
>How-To-Repeat:
If you already have a group of GID 106:
esther:ports/security/clamav % sudo make install
===> Installing for clamav-0.87
===> clamav-0.87 depends on executable: lha - found
===> clamav-0.87 depends on executable: unarj - found
===> clamav-0.87 depends on executable: unrar - found
===> clamav-0.87 depends on executable: zoo - found
===> clamav-0.87 depends on executable: arc - found
===> clamav-0.87 depends on executable: unzip - found
===> clamav-0.87 depends on shared library: gmp.6 - found
===> clamav-0.87 depends on shared library: curl.3 - found
pw: gid `106' has already been allocated
=> Adding group "clamav" failed...
*** Error code 1
Stop in /usr/ports/security/clamav.
>Fix:
No port should use a fixed GID (specially under 100) unless
there is a very good reason (and a method to deal with
collisions).
The following patch seems to cure the problem:
--- files/pkg-install.in.ORIG Thu Oct 6 12:24:50 2005
+++ files/pkg-install.in Thu Oct 6 12:25:17 2005
@@ -16,7 +16,7 @@
if [ "$2" = "PRE-INSTALL" ]; then
if ! pw groupshow "$CLAMAVGROUP" 2>/dev/null 1>&2; then
- if pw groupadd $CLAMAVGROUP -g $GID; then
+ if pw groupadd $CLAMAVGROUP; then
echo "=> Added group \"$CLAMAVGROUP\"."
else
echo "=> Adding group \"$CLAMAVGROUP\" failed..."
There is probably an identical issue with the UID.
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list