ports/160242: audio/murmur installs directories with incorrect owner
Luke Dean
luked at pobox.com
Sat Aug 27 20:40:09 UTC 2011
>Number: 160242
>Category: ports
>Synopsis: audio/murmur installs directories with incorrect owner
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sat Aug 27 20:40:09 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Luke Dean
>Release: 8.2-STABLE
>Organization:
>Environment:
FreeBSD foo.lukas.is-a-geek.org 8.2-STABLE FreeBSD 8.2-STABLE #1: Mon May 30 10:45:28 PDT 2011 user at foo.lukas.is-a-geek.org:/usr/obj/usr/src/sys/CUSTOM i386
>Description:
The audio/murmur port creates the "murmur" user and runs "murmurd" as this user. The pkg-install script creates the log, pid, and database directories and assigns ownership to the person running the installation, who may not be "murmur". murmurd will be unable to access its log, pid, or database in this situation.
>How-To-Repeat:
Perform a clean installation from ports. i.e.
su
cd /usr/ports/audio/murmur
make install
You will find that /var/log/murmur, /var/run/murmur, and /var/db/murmur have been created and are owned by ${USER} from your shell environment - you, not murmur.
>Fix:
One possible solution is to hardcode the user "murmur" into pkg-install instead of using ${USER} from the environment. A better solution would use the USERS variable from the Makefile, but I don't know how to do that.
Patch attached with submission follows:
--- pkg-install 2011-06-25 12:55:42.000000000 -0700
+++ /tmp/pkg-install 2011-08-27 12:45:48.000000000 -0700
@@ -1,6 +1,7 @@
#!/bin/sh
# $FreeBSD: ports/audio/murmur/pkg-install,v 1.3 2011/06/25 19:55:42 crees Exp $
+MURMUR_USER=murmur
PATH=/bin:/usr/sbin
LOGDIR=/var/log/murmur
RUNDIR=/var/run/murmur
@@ -10,7 +11,7 @@
PRE-INSTALL)
mkdir -m 750 ${LOGDIR} ${DBDIR} ${RUNDIR} 2> /dev/null
- chown -R ${USER}:${GROUP} ${LOGDIR} ${DBDIR} ${RUNDIR}
+ chown -R ${MURMUR_USER} ${LOGDIR} ${DBDIR} ${RUNDIR}
;;
esac
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list