From 762b3880c94c7133bd415e7cd457961912cb6d3f1f18dbe1cb09570a938405f9 Mon Sep 17 00:00:00 2001 From: Stanislav Brabec Date: Tue, 6 Aug 2019 23:09:02 +0000 Subject: [PATCH] Accepting request 721379 from home:sbrabec:branches:Base:System - Issue a warning for outdated pam files (bsc#1082293, boo#1081947#c68). - Fix comments and unify look of PAM files (login.pamd, remote.pamd, runuser-l.pamd, runuser.pamd, su-l.pamd, su.pamd). - Revert broken change. OBS-URL: https://build.opensuse.org/request/show/721379 OBS-URL: https://build.opensuse.org/package/show/Base:System/util-linux?expand=0&rev=413 --- python3-libmount.changes | 21 ++++++++++----------- python3-libmount.spec | 37 +++++++++++++++++++++++++++++++------ util-linux-systemd.changes | 21 ++++++++++----------- util-linux-systemd.spec | 37 +++++++++++++++++++++++++++++++------ util-linux.changes | 21 ++++++++++----------- util-linux.spec | 37 +++++++++++++++++++++++++++++++------ 6 files changed, 123 insertions(+), 51 deletions(-) diff --git a/python3-libmount.changes b/python3-libmount.changes index c62d0ea..399d84e 100644 --- a/python3-libmount.changes +++ b/python3-libmount.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Tue Aug 6 03:39:25 UTC 2019 - Stanislav Brabec + +- Issue a warning for outdated pam files + (bsc#1082293, boo#1081947#c68). +- Fix comments and unify look of PAM files (login.pamd, + remote.pamd, runuser-l.pamd, runuser.pamd, su-l.pamd, su.pamd). + + ------------------------------------------------------------------- Wed Jul 31 18:08:29 CEST 2019 - sbrabec@suse.com @@ -33,17 +42,7 @@ Mon Jul 22 17:19:22 CEST 2019 - sbrabec@suse.com - Fix /etc/default/su comments and create /etc/default/runuser (bsc#1121197#31). - -------------------------------------------------------------------- -Wed Jul 17 19:14:24 CEST 2019 - sbrabec@suse.com - -- Prevent outdated pam files (bsc#1082293, boo#1081947#c68): - * Remove "(noreplace)". It will enforce update whenever package - changes it. - * Expand tabs to trigger a change and replace potentially - outdated files just now (login.pamd, remote.pamd, - runuser-l.pamd, runuser.pamd, su-l.pamd, su.pamd). - * Remove script that migrates old coreutils su pam files. +- Remove /etc/default/su migration from coreutils. ------------------------------------------------------------------- Mon Jul 1 23:45:55 CEST 2019 - sbrabec@suse.com diff --git a/python3-libmount.spec b/python3-libmount.spec index 76f621e..557575f 100644 --- a/python3-libmount.spec +++ b/python3-libmount.spec @@ -752,6 +752,31 @@ ln -sf /sbin/service %{buildroot}/usr/sbin/rcfstrim %set_permissions %{_bindir}/wall %{_bindir}/write %{_bindir}/mount %{_bindir}/umount %set_permissions %{_bindir}/su # +# Safely migrate PAM files from coreutils to util-linux +# (openSUSE 12.3->13.1, SLE11->SLE12) +# +# coreutils with su were upgraded (and su removed) before util-linux +# with su was installed (see the Conflicts above). If the admin edited +# the PAM file, the seemingly no more used modified file was saved as +# .rpmsave and the new clean file was installed. As we want +# "noreplace" upgrade, and the contents of the clean file contents has +# no changes, we should restore admin modification, and rename the +# clean file to .rpmnew, as it would happen if the file was not moved +# from one package to another. +for PAM_FILE in su su-l ; do + if test -f %{_sysconfdir}/pam.d/$PAM_FILE.rpmsave ; then + mv %{_sysconfdir}/pam.d/$PAM_FILE %{_sysconfdir}/pam.d/$PAM_FILE.rpmnew + mv %{_sysconfdir}/pam.d/$PAM_FILE.rpmsave %{_sysconfdir}/pam.d/$PAM_FILE + fi +done +# +# If outdated PAM file is detected, issue a warning. +for PAM_FILE in remote runuser runuser-l su su-l ; do + if test -f %{_sysconfdir}/pam.d/$PAM_FILE.rpmnew ; then + echo "Your %{_sysconfdir}/pam.d/$PAM_FILE is oudated. Please check %{_sysconfdir}/pam.d/$PAM_FILE.rpmnew!" >&2 + fi +done +# # /etc/default/su is tagged as noreplace. # But we want to migrate variables to /etc/login.defs (bsc#1121197). # Perform one-time config replace. @@ -866,12 +891,12 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : %config(noreplace) %attr(644,root,root) %{_sysconfdir}/raw %config(noreplace) %{_sysconfdir}/filesystems %config(noreplace) %{_sysconfdir}/blkid.conf -%config %{_sysconfdir}/pam.d/login -%config %{_sysconfdir}/pam.d/remote -%config %{_sysconfdir}/pam.d/runuser -%config %{_sysconfdir}/pam.d/runuser-l -%config %{_sysconfdir}/pam.d/su -%config %{_sysconfdir}/pam.d/su-l +%config(noreplace) %{_sysconfdir}/pam.d/login +%config(noreplace) %{_sysconfdir}/pam.d/remote +%config(noreplace) %{_sysconfdir}/pam.d/runuser +%config(noreplace) %{_sysconfdir}/pam.d/runuser-l +%config(noreplace) %{_sysconfdir}/pam.d/su +%config(noreplace) %{_sysconfdir}/pam.d/su-l %config(noreplace) %{_sysconfdir}/default/runuser %config(noreplace) %{_sysconfdir}/default/su %config %dir %{_sysconfdir}/issue.d diff --git a/util-linux-systemd.changes b/util-linux-systemd.changes index c62d0ea..399d84e 100644 --- a/util-linux-systemd.changes +++ b/util-linux-systemd.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Tue Aug 6 03:39:25 UTC 2019 - Stanislav Brabec + +- Issue a warning for outdated pam files + (bsc#1082293, boo#1081947#c68). +- Fix comments and unify look of PAM files (login.pamd, + remote.pamd, runuser-l.pamd, runuser.pamd, su-l.pamd, su.pamd). + + ------------------------------------------------------------------- Wed Jul 31 18:08:29 CEST 2019 - sbrabec@suse.com @@ -33,17 +42,7 @@ Mon Jul 22 17:19:22 CEST 2019 - sbrabec@suse.com - Fix /etc/default/su comments and create /etc/default/runuser (bsc#1121197#31). - -------------------------------------------------------------------- -Wed Jul 17 19:14:24 CEST 2019 - sbrabec@suse.com - -- Prevent outdated pam files (bsc#1082293, boo#1081947#c68): - * Remove "(noreplace)". It will enforce update whenever package - changes it. - * Expand tabs to trigger a change and replace potentially - outdated files just now (login.pamd, remote.pamd, - runuser-l.pamd, runuser.pamd, su-l.pamd, su.pamd). - * Remove script that migrates old coreutils su pam files. +- Remove /etc/default/su migration from coreutils. ------------------------------------------------------------------- Mon Jul 1 23:45:55 CEST 2019 - sbrabec@suse.com diff --git a/util-linux-systemd.spec b/util-linux-systemd.spec index 88fd3dc..bf69aa7 100644 --- a/util-linux-systemd.spec +++ b/util-linux-systemd.spec @@ -752,6 +752,31 @@ ln -sf /sbin/service %{buildroot}/usr/sbin/rcfstrim %set_permissions %{_bindir}/wall %{_bindir}/write %{_bindir}/mount %{_bindir}/umount %set_permissions %{_bindir}/su # +# Safely migrate PAM files from coreutils to util-linux +# (openSUSE 12.3->13.1, SLE11->SLE12) +# +# coreutils with su were upgraded (and su removed) before util-linux +# with su was installed (see the Conflicts above). If the admin edited +# the PAM file, the seemingly no more used modified file was saved as +# .rpmsave and the new clean file was installed. As we want +# "noreplace" upgrade, and the contents of the clean file contents has +# no changes, we should restore admin modification, and rename the +# clean file to .rpmnew, as it would happen if the file was not moved +# from one package to another. +for PAM_FILE in su su-l ; do + if test -f %{_sysconfdir}/pam.d/$PAM_FILE.rpmsave ; then + mv %{_sysconfdir}/pam.d/$PAM_FILE %{_sysconfdir}/pam.d/$PAM_FILE.rpmnew + mv %{_sysconfdir}/pam.d/$PAM_FILE.rpmsave %{_sysconfdir}/pam.d/$PAM_FILE + fi +done +# +# If outdated PAM file is detected, issue a warning. +for PAM_FILE in remote runuser runuser-l su su-l ; do + if test -f %{_sysconfdir}/pam.d/$PAM_FILE.rpmnew ; then + echo "Your %{_sysconfdir}/pam.d/$PAM_FILE is oudated. Please check %{_sysconfdir}/pam.d/$PAM_FILE.rpmnew!" >&2 + fi +done +# # /etc/default/su is tagged as noreplace. # But we want to migrate variables to /etc/login.defs (bsc#1121197). # Perform one-time config replace. @@ -866,12 +891,12 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : %config(noreplace) %attr(644,root,root) %{_sysconfdir}/raw %config(noreplace) %{_sysconfdir}/filesystems %config(noreplace) %{_sysconfdir}/blkid.conf -%config %{_sysconfdir}/pam.d/login -%config %{_sysconfdir}/pam.d/remote -%config %{_sysconfdir}/pam.d/runuser -%config %{_sysconfdir}/pam.d/runuser-l -%config %{_sysconfdir}/pam.d/su -%config %{_sysconfdir}/pam.d/su-l +%config(noreplace) %{_sysconfdir}/pam.d/login +%config(noreplace) %{_sysconfdir}/pam.d/remote +%config(noreplace) %{_sysconfdir}/pam.d/runuser +%config(noreplace) %{_sysconfdir}/pam.d/runuser-l +%config(noreplace) %{_sysconfdir}/pam.d/su +%config(noreplace) %{_sysconfdir}/pam.d/su-l %config(noreplace) %{_sysconfdir}/default/runuser %config(noreplace) %{_sysconfdir}/default/su %config %dir %{_sysconfdir}/issue.d diff --git a/util-linux.changes b/util-linux.changes index c62d0ea..399d84e 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Tue Aug 6 03:39:25 UTC 2019 - Stanislav Brabec + +- Issue a warning for outdated pam files + (bsc#1082293, boo#1081947#c68). +- Fix comments and unify look of PAM files (login.pamd, + remote.pamd, runuser-l.pamd, runuser.pamd, su-l.pamd, su.pamd). + + ------------------------------------------------------------------- Wed Jul 31 18:08:29 CEST 2019 - sbrabec@suse.com @@ -33,17 +42,7 @@ Mon Jul 22 17:19:22 CEST 2019 - sbrabec@suse.com - Fix /etc/default/su comments and create /etc/default/runuser (bsc#1121197#31). - -------------------------------------------------------------------- -Wed Jul 17 19:14:24 CEST 2019 - sbrabec@suse.com - -- Prevent outdated pam files (bsc#1082293, boo#1081947#c68): - * Remove "(noreplace)". It will enforce update whenever package - changes it. - * Expand tabs to trigger a change and replace potentially - outdated files just now (login.pamd, remote.pamd, - runuser-l.pamd, runuser.pamd, su-l.pamd, su.pamd). - * Remove script that migrates old coreutils su pam files. +- Remove /etc/default/su migration from coreutils. ------------------------------------------------------------------- Mon Jul 1 23:45:55 CEST 2019 - sbrabec@suse.com diff --git a/util-linux.spec b/util-linux.spec index 4577d7a..71dc3ca 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -752,6 +752,31 @@ ln -sf /sbin/service %{buildroot}/usr/sbin/rcfstrim %set_permissions %{_bindir}/wall %{_bindir}/write %{_bindir}/mount %{_bindir}/umount %set_permissions %{_bindir}/su # +# Safely migrate PAM files from coreutils to util-linux +# (openSUSE 12.3->13.1, SLE11->SLE12) +# +# coreutils with su were upgraded (and su removed) before util-linux +# with su was installed (see the Conflicts above). If the admin edited +# the PAM file, the seemingly no more used modified file was saved as +# .rpmsave and the new clean file was installed. As we want +# "noreplace" upgrade, and the contents of the clean file contents has +# no changes, we should restore admin modification, and rename the +# clean file to .rpmnew, as it would happen if the file was not moved +# from one package to another. +for PAM_FILE in su su-l ; do + if test -f %{_sysconfdir}/pam.d/$PAM_FILE.rpmsave ; then + mv %{_sysconfdir}/pam.d/$PAM_FILE %{_sysconfdir}/pam.d/$PAM_FILE.rpmnew + mv %{_sysconfdir}/pam.d/$PAM_FILE.rpmsave %{_sysconfdir}/pam.d/$PAM_FILE + fi +done +# +# If outdated PAM file is detected, issue a warning. +for PAM_FILE in remote runuser runuser-l su su-l ; do + if test -f %{_sysconfdir}/pam.d/$PAM_FILE.rpmnew ; then + echo "Your %{_sysconfdir}/pam.d/$PAM_FILE is oudated. Please check %{_sysconfdir}/pam.d/$PAM_FILE.rpmnew!" >&2 + fi +done +# # /etc/default/su is tagged as noreplace. # But we want to migrate variables to /etc/login.defs (bsc#1121197). # Perform one-time config replace. @@ -866,12 +891,12 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : %config(noreplace) %attr(644,root,root) %{_sysconfdir}/raw %config(noreplace) %{_sysconfdir}/filesystems %config(noreplace) %{_sysconfdir}/blkid.conf -%config %{_sysconfdir}/pam.d/login -%config %{_sysconfdir}/pam.d/remote -%config %{_sysconfdir}/pam.d/runuser -%config %{_sysconfdir}/pam.d/runuser-l -%config %{_sysconfdir}/pam.d/su -%config %{_sysconfdir}/pam.d/su-l +%config(noreplace) %{_sysconfdir}/pam.d/login +%config(noreplace) %{_sysconfdir}/pam.d/remote +%config(noreplace) %{_sysconfdir}/pam.d/runuser +%config(noreplace) %{_sysconfdir}/pam.d/runuser-l +%config(noreplace) %{_sysconfdir}/pam.d/su +%config(noreplace) %{_sysconfdir}/pam.d/su-l %config(noreplace) %{_sysconfdir}/default/runuser %config(noreplace) %{_sysconfdir}/default/su %config %dir %{_sysconfdir}/issue.d