diff options
author | wxs <wxs@FreeBSD.org> | 2011-04-12 03:43:39 +0800 |
---|---|---|
committer | wxs <wxs@FreeBSD.org> | 2011-04-12 03:43:39 +0800 |
commit | 97b1c095bb1886b4b943dd0175183d8d02a3fbb7 (patch) | |
tree | b2f6639b46b02dd9d2cf458e7151a45f45ea3cf2 | |
parent | d1fa521ab764e5c8c55f09bbbff469034e0c6e49 (diff) | |
download | freebsd-ports-gnome-97b1c095bb1886b4b943dd0175183d8d02a3fbb7.tar.gz freebsd-ports-gnome-97b1c095bb1886b4b943dd0175183d8d02a3fbb7.tar.zst freebsd-ports-gnome-97b1c095bb1886b4b943dd0175183d8d02a3fbb7.zip |
The install process checks the validity of sudoers before installing
etc/sudoers.d. If you have an sudoers with the includedir directive the
install will fail. Fix this by creating the directory in a pre-install
target.
This should fix "The Great sudo Debacle of 2011" once and for all.
Tested by: dougb@
-rw-r--r-- | security/sudo/Makefile | 7 | ||||
-rw-r--r-- | security/sudo/pkg-install | 13 |
2 files changed, 19 insertions, 1 deletions
diff --git a/security/sudo/Makefile b/security/sudo/Makefile index 1633032cafc6..7cbc297681f9 100644 --- a/security/sudo/Makefile +++ b/security/sudo/Makefile @@ -7,7 +7,7 @@ PORTNAME= sudo PORTVERSION= 1.8.1 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= security MASTER_SITES= http://www.sudo.ws/sudo/dist/ \ http://www.signal42.com/mirrors/sudo_ftp/ \ @@ -119,6 +119,11 @@ post-patch: @${REINPLACE_CMD} -e 's/$$(DESTDIR)$$(sudoersdir) $$(DESTDIR)$$(docdir)/$$(DESTDIR)$$(sudoersdir)/' ${WRKSRC}/plugins/sudoers/Makefile.in .endif +# XXX: Because I botched the upgrade to 1.8.1, this is necessary. +# Eventually, once 1.8.1 is ancient enough, this can be removed. +pre-install: + @PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL + post-install: ${INSTALL_DATA} ${FILESDIR}/pam.conf ${PREFIX}/etc/pam.d/sudo.default if [ ! -f ${PREFIX}/etc/pam.d/sudo ]; then \ diff --git a/security/sudo/pkg-install b/security/sudo/pkg-install new file mode 100644 index 000000000000..7ae3587ce943 --- /dev/null +++ b/security/sudo/pkg-install @@ -0,0 +1,13 @@ +#! /bin/sh +# +# $FreeBSD$ + +PATH=/bin:/usr/bin:/usr/sbin + +case $2 in + +PRE-INSTALL) + install -d -o 0 -g 0 -M 0750 ${PKG_PREFIX}/etc/sudoers.d + ;; + +esac |