( cd lib64 ; rm -rf libpam.so )
( cd lib64 ; ln -sf libpam.so.0.85.1 libpam.so )
( cd lib64 ; rm -rf libpam.so.0 )
( cd lib64 ; ln -sf libpam.so.0.85.1 libpam.so.0 )
( cd lib64 ; rm -rf libpam_misc.so )
( cd lib64 ; ln -sf libpam_misc.so.0.82.1 libpam_misc.so )
( cd lib64 ; rm -rf libpam_misc.so.0 )
( cd lib64 ; ln -sf libpam_misc.so.0.82.1 libpam_misc.so.0 )
( cd lib64 ; rm -rf libpamc.so )
( cd lib64 ; ln -sf libpamc.so.0.82.1 libpamc.so )
( cd lib64 ; rm -rf libpamc.so.0 )
( cd lib64 ; ln -sf libpamc.so.0.82.1 libpamc.so.0 )
( cd lib64/security ; rm -rf pam_unix_acct.so )
( cd lib64/security ; ln -sf pam_unix.so pam_unix_acct.so )
( cd lib64/security ; rm -rf pam_unix_auth.so )
( cd lib64/security ; ln -sf pam_unix.so pam_unix_auth.so )
( cd lib64/security ; rm -rf pam_unix_passwd.so )
( cd lib64/security ; ln -sf pam_unix.so pam_unix_passwd.so )
( cd lib64/security ; rm -rf pam_unix_session.so )
( cd lib64/security ; ln -sf pam_unix.so pam_unix_session.so )


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/environment.new
config etc/security/namespace.init.new
config etc/security/group.conf.new
config etc/security/namespace.conf.new
config etc/security/limits.conf.new
config etc/security/console.perms.new
config etc/security/access.conf.new
config etc/security/pam_env.conf.new
config etc/security/time.conf.new
config etc/security/chroot.conf.new
config etc/security/faillock.conf.new
config etc/security/console.handlers.new
