Explicitly set mode and owner of /etc/sudoers instead of relying

on "cp -p" to work in the postinstall script.  On AIX 6.1 at least
the postinstall script runs before the final file permissions are set.
This commit is contained in:
Todd C. Miller
2011-06-10 15:26:35 -04:00
parent 0c292a56bf
commit f0e941a396

View File

@@ -208,7 +208,10 @@ still allow people to get their work done."
# Don't overwrite an existing sudoers file
sudoersdir=%{sudoersdir}
if test ! -r $sudoersdir/sudoers; then
cp -p $sudoersdir/sudoers.dist $sudoersdir/sudoers
cp $sudoersdir/sudoers.dist $sudoersdir/sudoers
chmod %{sudoers_mode} $sudoersdir/sudoers
chown %{sudoers_uid} $sudoersdir/sudoers
chgrp %{sudoers_gid} $sudoersdir/sudoers
fi
%post [deb]