aboutsummaryrefslogtreecommitdiffstats
path: root/security/sudo
diff options
context:
space:
mode:
authorasami <asami@FreeBSD.org>1996-07-20 05:00:43 +0800
committerasami <asami@FreeBSD.org>1996-07-20 05:00:43 +0800
commit16f8d2ba442baa73f99f7b81e4b3e46582e6b90f (patch)
tree2a3852f678d0857671198cb3419daee3db069645 /security/sudo
parentbdeb0c529abc71ea7d52b4e74fb38eaca3a14cfe (diff)
downloadfreebsd-ports-gnome-16f8d2ba442baa73f99f7b81e4b3e46582e6b90f.tar.gz
freebsd-ports-gnome-16f8d2ba442baa73f99f7b81e4b3e46582e6b90f.tar.zst
freebsd-ports-gnome-16f8d2ba442baa73f99f7b81e4b3e46582e6b90f.zip
Put "sudoers.sample" in the package and copy it to "sudoers" if the
latter doesn't already exist. Closes PR ports/1405 ("why can Satoshi sudo on my machine?").
Diffstat (limited to 'security/sudo')
-rw-r--r--security/sudo/pkg-install9
-rw-r--r--security/sudo/pkg-plist2
2 files changed, 10 insertions, 1 deletions
diff --git a/security/sudo/pkg-install b/security/sudo/pkg-install
new file mode 100644
index 000000000000..b633da87b270
--- /dev/null
+++ b/security/sudo/pkg-install
@@ -0,0 +1,9 @@
+#!/bin/sh
+if [ $2 != "POST-INSTALL" ]; then
+ exit 0
+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
+fi
diff --git a/security/sudo/pkg-plist b/security/sudo/pkg-plist
index dac5259bd7a2..08d6a469b268 100644
--- a/security/sudo/pkg-plist
+++ b/security/sudo/pkg-plist
@@ -1,6 +1,6 @@
bin/sudo
sbin/visudo
-etc/sudoers
+etc/sudoers.sample
man/man5/sudoers.5
man/man8/sudo.8
man/man8/visudo.8