1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-28 05:29:48 +00:00
freebsd-ports/security/sudo/pkg-install
Pete Fritchman cd65834dfc Fix permissions on the sudoers file when installed from package
PR:		30450
Submitted by:	Dimitry Andric <dim@xs4all.nl>
Approved by:	maintainer timeout
2001-11-21 02:09:13 +00:00

11 lines
280 B
Bash

#!/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
chmod 440 ${PKG_PREFIX}/etc/sudoers
fi