2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 06:15:37 +00:00

Make sure sudoers is writable before calling ed script.

This commit is contained in:
Todd C. Miller
2012-02-21 04:54:08 -05:00
parent f38afb532d
commit 0370e129ff

View File

@@ -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