diff --git a/util-linux.changes b/util-linux.changes index 6d1ea14..ab3bc3a 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Oct 2 18:55:22 CEST 2013 - sbrabec@suse.cz + +- Safely migrate su config files from coreutils to util-linux + (bnc#814626#c18). + ------------------------------------------------------------------- Fri Sep 27 21:58:03 UTC 2013 - mgorse@suse.com diff --git a/util-linux.spec b/util-linux.spec index 9936a5a..d3ca846 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -475,6 +475,23 @@ ln -sf ../..%{_sysconfdir}/init.d/uuidd %{buildroot}%{_sbindir}/rcuuidd %set_permissions %{_bindir}/wall %{_bindir}/write %{_bindir}/mount %{_bindir}/umount %if %{with enable_su} %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 default/su pam.d/su pam.d/su-l ; do + if test -f %{_sysconfdir}/$PAM_FILE.rpmsave ; then + mv %{_sysconfdir}/$PAM_FILE %{_sysconfdir}/$PAM_FILE.rpmnew + mv %{_sysconfdir}/$PAM_FILE.rpmsave %{_sysconfdir}/$PAM_FILE + fi +done %endif %if %{with enable_eject} %set_permissions %{_bindir}/eject