Bug 120885 - [patch] security/clamav - During install process, created work dirs have wrong permissions
Summary: [patch] security/clamav - During install process, created work dirs have wro...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Renato Botelho
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-20 15:30 UTC by dmx
Modified: 2008-02-21 13:21 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dmx 2008-02-20 15:30:03 UTC
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.

Fix: 

@@ -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--prhEb2TkKtlIszlx5FqhZdkTB44SxfUamzsCWtkn6BTThK7c
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- 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
How-To-Repeat: Just set some umask (e.g. umask 0222) and run "make install"
Comment 1 Beech Rintoul freebsd_committer freebsd_triage 2008-02-20 18:32:23 UTC
Responsible Changed
From-To: freebsd-ports-bugs->beech

I'll take it
Comment 2 Beech Rintoul freebsd_committer freebsd_triage 2008-02-20 21:18:36 UTC
State Changed
From-To: open->feedback

Maintainer is committer 


Comment 3 Beech Rintoul freebsd_committer freebsd_triage 2008-02-20 21:18:36 UTC
Responsible Changed
From-To: beech->garga

Over to maintainer
Comment 4 dfilter service freebsd_committer freebsd_triage 2008-02-21 13:20:00 UTC
garga       2008-02-21 13:19:51 UTC

  FreeBSD ports repository

  Modified files:
    security/clamav      Makefile 
    security/clamav/files pkg-install.in 
  Log:
  - Fix a thread problem on FreeBSD 5.x forcing it to use -lpthread [1]
  - Fix a problem on pkg-install, when umask is not default, it create dirs with
    wrong permissions [2]
  - Bump PORTREVISION
  
  PR:             ports/120885 [2]
  Submitted by:   dmx@dmx.org.ru [2]
  Noticed by:     havp pointyhat via pav
  
  Revision  Changes    Path
  1.109     +3 -0      ports/security/clamav/Makefile
  1.5       +4 -12     ports/security/clamav/files/pkg-install.in
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 5 Renato Botelho freebsd_committer freebsd_triage 2008-02-21 13:21:12 UTC
State Changed
From-To: feedback->closed

Committed. Thanks!