ports/175434: installation of security/openvpn-2.3.0_2 currupts ownership in /usr/local/{lib, sbin}
Benjamin Lorenz
freebsd at fortitu.de
Sat Jan 19 16:50:01 UTC 2013
>Number: 175434
>Category: ports
>Synopsis: installation of security/openvpn-2.3.0_2 currupts ownership in /usr/local/{lib,sbin}
>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 Jan 19 16:50:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: Benjamin Lorenz
>Release: 9.1 PRERELEASE
>Organization:
>Environment:
FreeBSD deepthought.lore.lan 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #0: Tue Sep 25 19:42:35 CEST 2012 root at deepthought.lore.lan:/usr/obj/usr/src/sys/DTKERNEL amd64
>Description:
I noticed a few changed owners/groups in the daily setuid mail, e.g.:
-2249360 -rwxr-sr-x 1 games games 1811506 Nov 9 23:34:39 2012 /usr/local/lib/nethack/nethack
+2249360 -rwxr-sr-x 1 root wheel 1811506 Nov 9 23:34:39 2012 /usr/local/lib/nethack/nethack
The first part of the post-install of openvpn-2.3.0_2 does
.for i in lib sbin
(cd ${_stagedir}${PREFIX}/${i} && ${COPYTREE_BIN} \* ${PREFIX}/${i}/)
.endfor
which results (among other commands) in:
chown -R root:wheel /usr/local/lib
chown -R root:wheel /usr/local/sbin
Files from virtualbox-ose and lsof were also affected.
>How-To-Repeat:
Have some files with owner:group != root:wheel in /usr/local/{sbin,lib} and install security/openvpn-2.3.0_2 .
The corresponding output is:
===> Installing rc.d startup script(s)
/bin/mkdir -p /usr/local/lib /usr/local/sbin /usr/local/include /usr/local/man
(cd /usr/ports/security/openvpn/work/instage/usr/local/lib && /bin/sh -c '(/usr/bin/find -d $0 $2 | /usr/bin/cpio -dumpl $1 >/dev/null 2>&1) && /usr/sbin/chown -R root:wheel $1 && /usr/bin/find -d $0 $2 -type d -exec chmod 755 $1/{} \; && /usr/bin/find -d $0 $2 -type f -exec chmod 555 $1/{} \;' -- \* /usr/local/lib/)
(cd /usr/ports/security/openvpn/work/instage/usr/local/sbin && /bin/sh -c '(/usr/bin/find -d $0 $2 | /usr/bin/cpio -dumpl $1 >/dev/null 2>&1) && /usr/sbin/chown -R root:wheel $1 && /usr/bin/find -d $0 $2 -type d -exec chmod 755 $1/{} \; && /usr/bin/find -d $0 $2 -type f -exec chmod 555 $1/{} \;' -- \* /usr/local/sbin/)
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list