aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authortmclaugh <tmclaugh@FreeBSD.org>2007-08-13 08:14:15 +0800
committertmclaugh <tmclaugh@FreeBSD.org>2007-08-13 08:14:15 +0800
commit0b29db26d74a67efaacad7b8a23361d30602ca34 (patch)
tree82a5629ba2107f26ff2034631480395ec19a258f /security
parentdf9281c183ac64ee1362866985decc5d6dab3056 (diff)
downloadfreebsd-ports-graphics-0b29db26d74a67efaacad7b8a23361d30602ca34.tar.gz
freebsd-ports-graphics-0b29db26d74a67efaacad7b8a23361d30602ca34.tar.zst
freebsd-ports-graphics-0b29db26d74a67efaacad7b8a23361d30602ca34.zip
- Work around broken configure script and explicitly set location of
sudo_noexec.so to unbreak NOEXEC option. [1] - Build using --with-secure-path if SUDO_SECURE_PATH is set when building the port. SUDO_SECURE_PATH should be set to a PATH string. [2] - Don't bother deleting sudo_noexec.la. Deleting the file after it's installed is ugly and since it's not harmful it's not worth patching the install. - Set CONFIGURE_TARGET. PR: 115442 [1], 115381 [2] Submitted by: vd [1], Janos Mohacsi [2]
Diffstat (limited to 'security')
-rw-r--r--security/sudo/Makefile15
-rw-r--r--security/sudo/pkg-plist1
2 files changed, 12 insertions, 4 deletions
diff --git a/security/sudo/Makefile b/security/sudo/Makefile
index e0aa17aa1cd..9dd2275543a 100644
--- a/security/sudo/Makefile
+++ b/security/sudo/Makefile
@@ -7,7 +7,7 @@
PORTNAME= sudo
PORTVERSION= 1.6.9.3
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= security
MASTER_SITES= http://www.sudo.ws/sudo/dist/ \
http://probsd.org/sudoftp/ \
@@ -26,6 +26,7 @@ COMMENT= Allow others to run commands as root
GNU_CONFIGURE= yes
+CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ARGS= --sysconfdir=${PREFIX}/etc \
--disable-log-wrap \
--with-ignore-dot \
@@ -33,7 +34,8 @@ CONFIGURE_ARGS= --sysconfdir=${PREFIX}/etc \
--with-env-editor \
--with-logincap \
--with-long-otp-prompt \
- --with-pam
+ --with-pam \
+ --with-noexec=${PREFIX}/libexec/sudo_noexec.so
OPTIONS= LDAP "With LDAP support" off \
INSULTS "With all insults" off \
@@ -41,6 +43,12 @@ OPTIONS= LDAP "With LDAP support" off \
.include <bsd.port.pre.mk>
+# SUDO_SECURE_PATH is a PATH string that will override the user's PATH.
+# ex: make SUDO_SECURE_PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin"
+.if defined(SUDO_SECURE_PATH)
+CONFIGURE_ARGS+=--with-secure-path="${SUDO_SECURE_PATH}"
+.endif
+
.if defined(WITH_INSULTS)
CONFIGURE_ARGS+=--with-insults
CONFIGURE_ARGS+=--with-all-insults
@@ -64,12 +72,11 @@ MAN8= sudo.8 visudo.8
MLINKS= sudo.8 sudoedit.8
post-install:
- ${RM} ${PREFIX}/libexec/sudo_noexec.la
${INSTALL_DATA} ${WRKSRC}/sudoers ${PREFIX}/etc/sudoers.default
${INSTALL_DATA} ${FILESDIR}/pam.conf ${PREFIX}/etc/pam.d/sudo.default
if [ ! -e ${PREFIX}/etc/pam.d/sudo ]; then \
- cp -p ${PREFIX}/etc/pam.d/sudo.default \
+ ${CP} -p ${PREFIX}/etc/pam.d/sudo.default \
${PREFIX}/etc/pam.d/sudo ;\
fi
diff --git a/security/sudo/pkg-plist b/security/sudo/pkg-plist
index 994fc14a563..c5957612a91 100644
--- a/security/sudo/pkg-plist
+++ b/security/sudo/pkg-plist
@@ -4,6 +4,7 @@ bin/sudo
bin/sudoedit
etc/pam.d/sudo.default
etc/sudoers.default
+libexec/sudo_noexec.la
libexec/sudo_noexec.so
sbin/visudo
%%PORTDOCS%%%%DOCSDIR%%/BUGS