From: Todd C. Miller Date: Fri, 10 Jun 2011 19:27:48 +0000 (-0400) Subject: Explicitly set mode and owner of /etc/sudoers instead of relying X-Git-Tag: SUDO_1_7_7~37 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0a652c7efa2e1c24acad0b2f06ca30b567cabd11;p=sudo 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. --HG-- branch : 1.7 --- diff --git a/sudo.pp b/sudo.pp index 35c18b7b8..b0f98f633 100644 --- a/sudo.pp +++ b/sudo.pp @@ -205,7 +205,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]