aboutsummaryrefslogtreecommitdiff
path: root/security/sudo
diff options
context:
space:
mode:
authorWesley Shields <wxs@FreeBSD.org>2010-08-16 02:16:26 +0000
committerWesley Shields <wxs@FreeBSD.org>2010-08-16 02:16:26 +0000
commit09077111fca0d6553e5368958a1d881e7fc4b932 (patch)
tree5d33bfffa6420ede4336f3e2f8971924735376f1 /security/sudo
parent587fcc73b8e2e25a71fe5c853e8c63d5f7576e68 (diff)
Notes
Diffstat (limited to 'security/sudo')
-rw-r--r--security/sudo/Makefile34
-rw-r--r--security/sudo/distinfo6
-rw-r--r--security/sudo/files/patch-Makefile.in15
-rw-r--r--security/sudo/files/patch-sudoers33
-rw-r--r--security/sudo/pkg-plist13
5 files changed, 56 insertions, 45 deletions
diff --git a/security/sudo/Makefile b/security/sudo/Makefile
index 955ee327a8dd..b206dee73924 100644
--- a/security/sudo/Makefile
+++ b/security/sudo/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= sudo
-PORTVERSION= 1.7.3
+PORTVERSION= 1.7.4.2
CATEGORIES= security
MASTER_SITES= http://www.sudo.ws/sudo/dist/ \
ftp://obsd.isc.org/pub/sudo/ \
@@ -14,7 +14,7 @@ MASTER_SITES= http://www.sudo.ws/sudo/dist/ \
ftp://boulder.tele.dk/pub/sudo/ \
ftp://core.ring.gr.jp/pub/misc/sudo/ \
ftp://ftp.wiretapped.net/pub/security/host-security/sudo/
-DISTNAME= ${PORTNAME}-1.7.3
+DISTNAME= ${PORTNAME}-1.7.4p2
MAINTAINER= wxs@FreeBSD.org
COMMENT= Allow others to run commands as root
@@ -84,27 +84,17 @@ MAN5+= sudoers.5
MAN8= sudo.8 visudo.8 sudoreplay.8
MLINKS= sudo.8 sudoedit.8
-post-install:
- ${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 \
- ${PREFIX}/etc/pam.d/sudo ;\
- fi
+post-patch:
+.if defined(NOPORTDOCS)
+ @${REINPLACE_CMD} -e 's/$$(DESTDIR)$$(sudoersdir) $$(DESTDIR)$$(docdir)/$$(DESTDIR)$$(sudoersdir)/' \
+ ${WRKSRC}/Makefile.in
-.if !defined(NOPORTDOCS)
- ${MKDIR} ${DOCSDIR}
- ${INSTALL_DATA} ${WRKSRC}/ChangeLog ${DOCSDIR}
- ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
- ${INSTALL_DATA} ${WRKSRC}/TROUBLESHOOTING ${DOCSDIR}
- ${INSTALL_DATA} ${WRKSRC}/UPGRADE ${DOCSDIR}
- ${INSTALL_DATA} ${WRKSRC}/sample.sudoers ${DOCSDIR}
-.if defined(WITH_LDAP)
- ${INSTALL_DATA} ${WRKSRC}/README.LDAP ${DOCSDIR}
- ${INSTALL_DATA} ${WRKSRC}/schema.OpenLDAP ${DOCSDIR}
- ${INSTALL_SCRIPT} ${WRKSRC}/sudoers2ldif ${DOCSDIR}
-.endif
+ @${REINPLACE_CMD} -e '/for f in ChangeLog/d' ${WRKSRC}/Makefile.in
.endif
+post-install:
+ if [ ! -f ${PREFIX}/etc/sudoers ]; then \
+ ${CP} -p ${PREFIX}/etc/sudoers.sample ${PREFIX}/etc/sudoers; \
+ fi
+
.include <bsd.port.post.mk>
diff --git a/security/sudo/distinfo b/security/sudo/distinfo
index b0d509960fc6..3d2bc80c41c7 100644
--- a/security/sudo/distinfo
+++ b/security/sudo/distinfo
@@ -1,3 +1,3 @@
-MD5 (sudo-1.7.3.tar.gz) = c22115b47cb2591bceedb914b673f031
-SHA256 (sudo-1.7.3.tar.gz) = d1aeb6bb8770c4239cfb33ff6e5e6b7c3c026f245b546f2eda147da2f742d0ba
-SIZE (sudo-1.7.3.tar.gz) = 896160
+MD5 (sudo-1.7.4p2.tar.gz) = 80f3a2506f0ec3e2d75e7d17d95f5341
+SHA256 (sudo-1.7.4p2.tar.gz) = 5e53839abd6bf8d23197cf2c4e54e14ebfd996e8b95ce0c6cb35cadacc1181e5
+SIZE (sudo-1.7.4p2.tar.gz) = 962214
diff --git a/security/sudo/files/patch-Makefile.in b/security/sudo/files/patch-Makefile.in
new file mode 100644
index 000000000000..b3bab6ba66c9
--- /dev/null
+++ b/security/sudo/files/patch-Makefile.in
@@ -0,0 +1,15 @@
+--- ./Makefile.in.orig 2010-07-30 11:58:54.000000000 -0400
++++ ./Makefile.in 2010-08-15 21:33:54.000000000 -0400
+@@ -493,11 +493,9 @@
+ if [ -f .libs/lib$(noexecfile) ]; then $(INSTALL) -b~ -O $(install_uid) -G $(install_gid) -M 0755 .libs/lib$(noexecfile) $(DESTDIR)$(noexecdir)/$(noexecfile); fi
+
+ install-sudoers: install-dirs
+- $(INSTALL) -d -O $(sudoers_uid) -G $(sudoers_gid) -M 0750 \
+- $(DESTDIR)$(sudoersdir)/sudoers.d
+ test -f $(DESTDIR)$(sudoersdir)/sudoers || \
+ $(INSTALL) -O $(sudoers_uid) -G $(sudoers_gid) -M $(sudoers_mode) \
+- $(srcdir)/sudoers $(DESTDIR)$(sudoersdir)/sudoers
++ $(srcdir)/sudoers $(DESTDIR)$(sudoersdir)/sudoers.sample
+
+ install-doc: install-dirs ChangeLog
+ (cd $(srcdir) && for f in ChangeLog HISTORY LICENSE NEWS README TROUBLESHOOTING UPGRADE sample.*; do $(INSTALL) -O $(install_uid) -G $(install_gid) -M 0444 $$f $(DESTDIR)$(docdir); done)
diff --git a/security/sudo/files/patch-sudoers b/security/sudo/files/patch-sudoers
index 0183f396f043..dc95d16d3733 100644
--- a/security/sudo/files/patch-sudoers
+++ b/security/sudo/files/patch-sudoers
@@ -1,16 +1,17 @@
---- sudoers.orig 2008-01-15 22:18:17.000000000 +0000
-+++ sudoers 2008-10-11 20:36:46.928244000 +0000
-@@ -14,6 +14,13 @@
- # Cmnd alias specification
-
- # Defaults specification
-+# Uncomment if needed to preserve environmental variables related to the
-+# FreeBSD pkg_* utilities and fetch.
-+#Defaults env_keep += "PKG_PATH PKG_DBDIR PKG_TMPDIR TMPDIR PACKAGEROOT PACKAGESITE PKGDIR FTP_PASSIVE_MODE"
-+
-+# Additionally uncomment if needed to preserve environmental variables
-+# related to portupgrade.
-+#Defaults env_keep += "PORTSDIR PORTS_INDEX PORTS_DBDIR PACKAGES PKGTOOLS_CONF"
-
- # Runas alias specification
-
+--- ./sudoers.orig 2010-07-30 11:58:54.000000000 -0400
++++ ./sudoers 2010-08-15 21:31:54.000000000 -0400
+@@ -31,6 +31,14 @@
+ ##
+ ## Defaults specification
+ ##
++## Uncomment if needed to preserve environmental variables related to the
++## FreeBSD pkg_* utilities and fetch.
++# Defaults env_keep += "PKG_PATH PKG_DBDIR PKG_TMPDIR TMPDIR PACKAGEROOT PACKAGESITE PKGDIR FTP_PASSIVE_MODE"
++##
++## Additionally uncomment if needed to preserve environmental variables
++## related to portupgrade
++# Defaults env_keep += "PORTSDIR PORTS_INDEX PORTS_DBDIR PACKAGES PKGTOOLS_CONF"
++##
+ ## You may wish to keep some of the following environment variables
+ ## when running commands via sudo.
+ ##
diff --git a/security/sudo/pkg-plist b/security/sudo/pkg-plist
index a2c6e3d1acf4..d558b8d4db94 100644
--- a/security/sudo/pkg-plist
+++ b/security/sudo/pkg-plist
@@ -1,16 +1,21 @@
-@unexec if cmp -s %D/etc/sudoers %D/etc/sudoers.default; then rm -f %D/etc/sudoers; fi
-@unexec if cmp -s %D/etc/pam.d/sudo %D/etc/pam.d/sudo.default; then rm -f %D/etc/pam.d/sudo; fi
bin/sudo
bin/sudoedit
bin/sudoreplay
-etc/pam.d/sudo.default
-etc/sudoers.default
+@unexec if cmp -s %D/etc/sudoers.sample %D/etc/sudoers; then rm -f %D/etc/sudoers; fi
+etc/sudoers.sample
+@exec if [ ! -f %D/etc/sudoers ] ; then cp -p %D/%F %B/sudoers; fi
+libexec/sudo_noexec.so
sbin/visudo
%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
+%%PORTDOCS%%%%DOCSDIR%%/HISTORY
+%%PORTDOCS%%%%DOCSDIR%%/LICENSE
+%%PORTDOCS%%%%DOCSDIR%%/NEWS
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%%%DOCSDIR%%/TROUBLESHOOTING
%%PORTDOCS%%%%DOCSDIR%%/UPGRADE
+%%PORTDOCS%%%%DOCSDIR%%/sample.pam
%%PORTDOCS%%%%DOCSDIR%%/sample.sudoers
+%%PORTDOCS%%%%DOCSDIR%%/sample.syslog.conf
%%LDAP%%%%PORTDOCS%%%%DOCSDIR%%/README.LDAP
%%LDAP%%%%PORTDOCS%%%%DOCSDIR%%/schema.OpenLDAP
%%LDAP%%%%PORTDOCS%%%%DOCSDIR%%/sudoers2ldif