From 97b1c095bb1886b4b943dd0175183d8d02a3fbb7 Mon Sep 17 00:00:00 2001 From: wxs Date: Mon, 11 Apr 2011 19:43:39 +0000 Subject: 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@ --- security/sudo/Makefile | 7 ++++++- security/sudo/pkg-install | 13 +++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 security/sudo/pkg-install (limited to 'security') 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 -- cgit