slackware-current/patches/source/sudo/doinst.sh
Patrick J Volkerding 2d3e95aa33 Sat Nov 5 19:18:19 UTC 2022
patches/packages/sudo-1.9.12p1-x86_64-1_slack15.0.txz:  Upgraded.
  Fixed a potential out-of-bounds write for passwords smaller than 8
  characters when passwd authentication is enabled.
  This does not affect configurations that use other authentication
  methods such as PAM, AIX authentication or BSD authentication.
  For more information, see:
    https://www.cve.org/CVERecord?id=CVE-2022-43995
  (* Security fix *)
2022-11-06 13:30:38 +01:00

14 lines
394 B
Bash

#!/bin/sh
config() {
NEW="$1"
OLD="`dirname $NEW`/`basename $NEW .new`"
# If there's no config file by that name, mv it over:
if [ ! -r $OLD ]; then
mv $NEW $OLD
elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
rm $NEW
fi
# Otherwise, we leave the .new copy for the admin to consider...
}
config etc/sudoers.new
rm -f etc/sudoers.new