- Remove etc/sudoers on deinstall if user haven't modified it
PR: ports/69288 (based on) Approved by: maintainer timeout (mharo; year and a half)
This commit is contained in:
parent
ca806cdbd7
commit
e5eaf1bdf0
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=151452
3 changed files with 5 additions and 2 deletions
|
@ -7,6 +7,7 @@
|
|||
|
||||
PORTNAME= sudo
|
||||
PORTVERSION= 1.6.8.12
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= security
|
||||
MASTER_SITES= http://www.sudo.ws/sudo/dist/ \
|
||||
http://probsd.org/sudoftp/ \
|
||||
|
@ -56,6 +57,7 @@ post-patch:
|
|||
|
||||
post-install:
|
||||
${INSTALL_DATA} ${WRKSRC}/sample.sudoers ${PREFIX}/etc/sudoers.sample
|
||||
${INSTALL_DATA} ${WRKSRC}/sudoers ${PREFIX}/etc/sudoers.default
|
||||
${RM} ${PREFIX}/libexec/sudo_noexec.la
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
|
|
|
@ -5,6 +5,6 @@ fi
|
|||
if [ -e ${PKG_PREFIX}/etc/sudoers ]; then
|
||||
echo "Will not overwrite existing ${PKG_PREFIX}/etc/sudoers file."
|
||||
else
|
||||
cp -p ${PKG_PREFIX}/etc/sudoers.sample ${PKG_PREFIX}/etc/sudoers
|
||||
cp -p ${PKG_PREFIX}/etc/sudoers.default ${PKG_PREFIX}/etc/sudoers
|
||||
chmod 440 ${PKG_PREFIX}/etc/sudoers
|
||||
fi
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
@unexec if cmp -s %D/etc/sudoers %D/etc/sudoers.sample; then rm -f %D/etc/sudoers; fi
|
||||
@unexec if cmp -s %D/etc/sudoers %D/etc/sudoers.default; then rm -f %D/etc/sudoers; fi
|
||||
bin/sudo
|
||||
bin/sudoedit
|
||||
etc/sudoers.default
|
||||
etc/sudoers.sample
|
||||
libexec/sudo_noexec.so
|
||||
sbin/visudo
|
||||
|
|
Loading…
Reference in a new issue