mirror of
https://github.com/sudo-project/sudo.git
synced 2025-09-04 00:05:11 +00:00
Make sure sudoers is writable before calling ed script.
This commit is contained in:
4
sudo.pp
4
sudo.pp
@@ -74,14 +74,17 @@ still allow people to get their work done."
|
|||||||
# Note that the order must match that of sudoers.
|
# Note that the order must match that of sudoers.
|
||||||
case "$pp_rpm_distro" in
|
case "$pp_rpm_distro" in
|
||||||
centos*|rhel*)
|
centos*|rhel*)
|
||||||
|
chmod u+w ${pp_destdir}${sudoersdir}/sudoers
|
||||||
/bin/ed - ${pp_destdir}${sudoersdir}/sudoers <<-'EOF'
|
/bin/ed - ${pp_destdir}${sudoersdir}/sudoers <<-'EOF'
|
||||||
/Locale settings/+1,s/^# //
|
/Locale settings/+1,s/^# //
|
||||||
/Desktop path settings/+1,s/^# //
|
/Desktop path settings/+1,s/^# //
|
||||||
w
|
w
|
||||||
q
|
q
|
||||||
EOF
|
EOF
|
||||||
|
chmod u-w ${pp_destdir}${sudoersdir}/sudoers
|
||||||
;;
|
;;
|
||||||
sles*)
|
sles*)
|
||||||
|
chmod u+w ${pp_destdir}${sudoersdir}/sudoers
|
||||||
/bin/ed - ${pp_destdir}${sudoersdir}/sudoers <<-'EOF'
|
/bin/ed - ${pp_destdir}${sudoersdir}/sudoers <<-'EOF'
|
||||||
/Locale settings/+1,s/^# //
|
/Locale settings/+1,s/^# //
|
||||||
/ConsoleKit session/+1,s/^# //
|
/ConsoleKit session/+1,s/^# //
|
||||||
@@ -90,6 +93,7 @@ still allow people to get their work done."
|
|||||||
w
|
w
|
||||||
q
|
q
|
||||||
EOF
|
EOF
|
||||||
|
chmod u-w ${pp_destdir}${sudoersdir}/sudoers
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user