remove pam-modules which do not exists no more from /etc/pam.d/*

This commit is contained in:
Mikhail Novosyolov 2024-03-18 11:46:32 +03:00
parent eeb3ec53a5
commit 8bf67af666

View file

@ -15,7 +15,7 @@
Summary: A security tool which provides authentication for applications
Name: pam
Version: 1.6.0
Release: 2
Release: 3
Epoch: 1
# The library is BSD licensed with option to relicense as GPLv2+ - this option is redundant
# as the BSD license allows that anyway. pam_timestamp and pam_console modules are GPLv2+,
@ -87,8 +87,8 @@ BuildConflicts: pkgconfig(libprelude)
%endif
Requires: cracklib-dicts
Requires: setup >= 2.7.12-2
Requires(post): coreutils >= 8.12-7.2
Requires: libpwquality >= 0.9.9
Requires(posttrans): grep sed
%description
PAM (Pluggable Authentication Modules) is a system security tool that
@ -141,14 +141,11 @@ having to recompile programs that handle authentication.
%{_sbindir}/faillock
%posttrans
# (cg) Ensure that the pam_systemd.so is included for user ACLs under systemd
# Note: Only affects upgrades, but does no harm so always update if needed.
if ! grep -q "pam_systemd\.so" /etc/pam.d/system-auth; then
echo "-session optional pam_systemd.so" >>/etc/pam.d/system-auth
fi
if [ ! -a /var/log/tallylog ] ; then
install -m 600 /dev/null /var/log/tallylog
set -e
if ! test -f /var/lib/.pam-posttrans-cleanup && grep -qE 'pam_console|pam_lastlog' /etc/pam.d/*
then
sed -i'.rpmsave' -e '/pam_console.so/d' -e '/pam_lastlog.so/d' /etc/pam.d/*
touch /var/lib/.pam-posttrans-cleanup
fi
#----------------------------------------------------------------------------