From 0370e129ff258bfe0febf0359df4f0ce9c229da6 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Tue, 21 Feb 2012 04:54:08 -0500 Subject: [PATCH] Make sure sudoers is writable before calling ed script. --- sudo.pp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sudo.pp b/sudo.pp index 6aa0360bc..54e3410a1 100644 --- a/sudo.pp +++ b/sudo.pp @@ -74,14 +74,17 @@ still allow people to get their work done." # Note that the order must match that of sudoers. case "$pp_rpm_distro" in centos*|rhel*) + chmod u+w ${pp_destdir}${sudoersdir}/sudoers /bin/ed - ${pp_destdir}${sudoersdir}/sudoers <<-'EOF' /Locale settings/+1,s/^# // /Desktop path settings/+1,s/^# // w q EOF + chmod u-w ${pp_destdir}${sudoersdir}/sudoers ;; sles*) + chmod u+w ${pp_destdir}${sudoersdir}/sudoers /bin/ed - ${pp_destdir}${sudoersdir}/sudoers <<-'EOF' /Locale settings/+1,s/^# // /ConsoleKit session/+1,s/^# // @@ -90,6 +93,7 @@ still allow people to get their work done." w q EOF + chmod u-w ${pp_destdir}${sudoersdir}/sudoers ;; esac -- 2.40.0