Date: Wed, 20 Feb 2008 17:47:10 +0300 (MSK) From: dmx@dmx.org.ru To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/120885: [patch] security/clamav. During install process, created work dirs have wrong permissions Message-ID: <200802201447.m1KElA9N088277@tiger.tehnopark.org> Resent-Message-ID: <200802201530.m1KFU4cY030604@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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@dmx.org.ru >Release: FreeBSD 6.2-STABLE amd64 >Organization: dmx@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@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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200802201447.m1KElA9N088277>