mirror of
git://slackware.nl/current.git
synced 2024-11-16 07:48:02 +01:00
080300e1e7
a/kernel-firmware-20200206_5351afe-noarch-1.txz: Upgraded. ap/ghostscript-9.50-x86_64-2.txz: Rebuilt. Recompiled against krb5-1.17.1. ap/gutenprint-5.3.3-x86_64-2.txz: Rebuilt. Recompiled against krb5-1.17.1. ap/nano-4.8-x86_64-1.txz: Upgraded. ap/screen-4.8.0-x86_64-1.txz: Upgraded. ap/vim-8.2.0224-x86_64-1.txz: Upgraded. d/cvs-1.11.23-x86_64-4.txz: Rebuilt. Recompiled against krb5-1.17.1. d/strace-5.5-x86_64-1.txz: Upgraded. kde/kdelibs-4.14.38-x86_64-6.txz: Rebuilt. Recompiled against krb5-1.17.1. l/gtk+2-2.24.32-x86_64-3.txz: Rebuilt. Recompiled against krb5-1.17.1. l/gtk+3-3.24.13-x86_64-2.txz: Rebuilt. Recompiled against krb5-1.17.1. l/libsoup-2.68.3-x86_64-2.txz: Rebuilt. Recompiled against krb5-1.17.1. l/libssh-0.9.3-x86_64-2.txz: Rebuilt. Recompiled against krb5-1.17.1. l/loudmouth-1.5.3-x86_64-4.txz: Rebuilt. Recompiled against krb5-1.17.1. l/neon-0.30.2-x86_64-2.txz: Rebuilt. Recompiled against krb5-1.17.1. n/cifs-utils-6.10-x86_64-2.txz: Rebuilt. Recompiled to build cifs.upcall. n/curl-7.68.0-x86_64-2.txz: Rebuilt. Recompiled against krb5-1.17.1. n/cyrus-sasl-2.1.27-x86_64-2.txz: Rebuilt. Recompiled against krb5-1.17.1. xap/vim-gvim-8.2.0224-x86_64-1.txz: Upgraded.
53 lines
1.3 KiB
Bash
53 lines
1.3 KiB
Bash
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...
|
|
}
|
|
preserve_perms() {
|
|
NEW="$1"
|
|
OLD="$(dirname ${NEW})/$(basename ${NEW} .new)"
|
|
if [ -e ${OLD} ]; then
|
|
cp -a ${OLD} ${NEW}.incoming
|
|
cat ${NEW} > ${NEW}.incoming
|
|
touch -r ${NEW} ${NEW}.incoming
|
|
mv ${NEW}.incoming ${NEW}
|
|
fi
|
|
config ${NEW}
|
|
}
|
|
|
|
if [ -r etc/pam.d/sshd.new ]; then
|
|
config etc/pam.d/sshd.new
|
|
fi
|
|
config etc/default/sshd.new
|
|
config etc/ssh/ssh_config.new
|
|
config etc/ssh/sshd_config.new
|
|
preserve_perms etc/rc.d/rc.sshd.new
|
|
if [ -e etc/rc.d/rc.sshd.new ]; then
|
|
mv etc/rc.d/rc.sshd.new etc/rc.d/rc.sshd
|
|
fi
|
|
|
|
# If the sshd user/group/shadow don't exist, add them:
|
|
|
|
if ! grep -q "^sshd:" etc/passwd ; then
|
|
echo "sshd:x:33:33:sshd:/:" >> etc/passwd
|
|
fi
|
|
|
|
if ! grep -q "^sshd:" etc/group ; then
|
|
echo "sshd::33:sshd" >> etc/group
|
|
fi
|
|
|
|
if ! grep -q "^sshd:" etc/shadow ; then
|
|
echo "sshd:*:9797:0:::::" >> etc/shadow
|
|
fi
|
|
|
|
# Add a btmp file to store login failure if one doesn't exist:
|
|
if [ ! -r var/log/btmp ]; then
|
|
( cd var/log ; umask 077 ; touch btmp )
|
|
fi
|
|
|