ports/120885: [patch] security/clamav. During install process, created work dirs have wrong permissions

dmx at dmx.org.ru dmx at dmx.org.ru
Wed Feb 20 15:30:04 UTC 2008


>Number:         120885
>Category:       ports
>Synopsis:       [patch] security/clamav. During install process, created work dirs have wrong permissions
>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:   Wed Feb 20 15:30:03 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     dmx at dmx.org.ru
>Release:        FreeBSD 6.2-STABLE amd64
>Organization:
dmx at dmx.org.ru
>Environment:
System: FreeBSD tiger.tehnopark.org 6.2-STABLE FreeBSD 6.2-STABLE #1: Wed Apr 4 04:48:40 MSD 2007 root at tiger.tehnopark.org:/usr/obj/usr/src/sys/TIGER amd64
>Description:
security/clamav port (clamav-0.92.1)
With wrong umask before install, make install clamav port,
directories (DBDIR, LOGDIR, RUNDIR) will be create with wrong permissions.
>How-To-Repeat:
Just set some umask (e.g. umask 0222) and run "make install"
>Fix:
--- pkg-install.in.orig Wed Mar 28 15:12:07 2007
+++ pkg-install.in  Wed Feb 20 16:54:47 2008
@@ -13,8 +13,7 @@
 RUNDIR=%%RUNDIR%%
 
 PW="pw"
-CHOWN="chown"
-MKDIR="mkdir -p"
+MKDIR="install -v -d -m 0755 -o ${CLAMAVUSER} -g ${CLAMAVGROUP}"
 
 if [ "$2" = "PRE-INSTALL" ]; then

@@ -42,14 +41,9 @@
 
 elif [ "$2" = "POST-INSTALL" ]; then

-   [ ! -d "${DBDIR}" ] && (${MKDIR} ${DBDIR} || exit 1)
-   ${CHOWN} -R ${CLAMAVUSER}:${CLAMAVGROUP} ${DBDIR} || exit 1
-
-   [ ! -d "${LOGDIR}" ] && (${MKDIR} ${LOGDIR} || exit 1)
-   ${CHOWN} -R ${CLAMAVUSER}:${CLAMAVGROUP} ${LOGDIR} || exit 1
-
-   [ ! -d "${RUNDIR}" ] && (${MKDIR} ${RUNDIR} || exit 1)
-   ${CHOWN} -R ${CLAMAVUSER}:${CLAMAVGROUP} ${RUNDIR} || exit 1
+   ${MKDIR} ${DBDIR} || exit 1
+   ${MKDIR} ${LOGDIR} || exit 1
+   ${MKDIR} ${RUNDIR} || exit 1
 
 fi

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



More information about the freebsd-ports-bugs mailing list