Bug 1222329 - AUDIT-WHITELIST: util-linux: pam_lastlog2.so got moved from lastlog2
Summary: AUDIT-WHITELIST: util-linux: pam_lastlog2.so got moved from lastlog2
Status: RESOLVED INVALID
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Security (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Matthias Gerstner
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-04 15:04 UTC by Thorsten Kukuk
Modified: 2024-04-17 17:24 UTC (History)
2 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thorsten Kukuk 2024-04-04 15:04:18 UTC
The lastlog2 package got merged into util-linux. As result, pam_lastlog2.so is now part of util-linux-systemd.

Packages can be found at:
https://build.opensuse.org/package/show/home:kukuk:cleanup/util-linux
Comment 1 Matthias Gerstner 2024-04-05 08:20:55 UTC
Thank you for raising the bug. We will take care of adjusting our records.
Comment 2 Matthias Gerstner 2024-04-05 12:17:54 UTC
I checked the changes since the last review and the differences between
standalong lastlog2 and the version now found in util-linux. It all seems all
right.

Do you need the whitelisting for the lastlog2 package in Factory any longer,
or can we drop that one now?
Comment 3 Thorsten Kukuk 2024-04-05 12:54:18 UTC
(In reply to Matthias Gerstner from comment #2)

> Do you need the whitelisting for the lastlog2 package in Factory any longer,
> or can we drop that one now?

The standalone lastlog2 package will stay in ALP for longer, as util-linux 2.40 did come too late for this.
I don't know how you share the rpmlint checks between Factory and ALP, but ALP will continue to get updates from Factory, so a rpmlint update there should not break lastlog2 in ALP.
Comment 4 Matthias Gerstner 2024-04-05 13:26:36 UTC
Up to now we are syncing ALP with Factory, but this would be a case for
creating a dedicated ALP branch for the whitelistings.

In any case I guess I leave the old whitelisting around a bit longer, once the
package is removed from Factory anyway.
Comment 5 OBSbugzilla Bot 2024-04-05 15:55:02 UTC
This is an autogenerated message for OBS integration:
This bug (1222329) was mentioned in
https://build.opensuse.org/request/show/1165682 Factory / rpmlint
Comment 6 OBSbugzilla Bot 2024-04-08 11:35:04 UTC
This is an autogenerated message for OBS integration:
This bug (1222329) was mentioned in
https://build.opensuse.org/request/show/1166154 Factory / rpmlint
Comment 7 Thorsten Kukuk 2024-04-08 12:20:33 UTC
(In reply to Matthias Gerstner from comment #4)
> Up to now we are syncing ALP with Factory, but this would be a case for
> creating a dedicated ALP branch for the whitelistings.
> 
> In any case I guess I leave the old whitelisting around a bit longer, once
> the
> package is removed from Factory anyway.

For migration reasons we had to make further changes:
util-linux will now create a sub-package with the old name "lastlog2" which contains the pam_lastlog2.so file, else it is not possible with RPM to keep the user made config changes during migration/update.
So the name of the RPM will stay the same, but only build from another source.
Sorry, but we found only out today that our first approach did not work correct.
Comment 8 Matthias Gerstner 2024-04-09 08:38:29 UTC
Okay we will revert the change and I'm closing this bug.
Comment 9 Stanislav Brabec 2024-04-10 11:55:17 UTC
Thorsten Kukuk, comment 7:

There is a solution outside RPM without splitting the package using dedicated scriplets in the new package.

User made configs are moved to rpmsave during the old package removal.
The new package scriptlet will pick the rpmsave files and put the to its original place (for noreplace config files) or to rpmnew (for standard config files).
Comment 10 Thorsten Kukuk 2024-04-10 13:30:17 UTC
(In reply to Stanislav Brabec from comment #9)
> Thorsten Kukuk, comment 7:
> 
> There is a solution outside RPM without splitting the package using
> dedicated scriplets in the new package.
> 
> User made configs are moved to rpmsave during the old package removal.
> The new package scriptlet will pick the rpmsave files and put the to its
> original place (for noreplace config files) or to rpmnew (for standard
> config files).

pam-config files are no %config files, they are %ghost files for historical reasons due to the wrong %ghost policy in openSUSE :( 
The admin made changes are really lost in this special case.
Comment 11 OBSbugzilla Bot 2024-04-16 12:35:04 UTC
This is an autogenerated message for OBS integration:
This bug (1222329) was mentioned in
https://build.opensuse.org/request/show/1168340 Factory / rpmlint
Comment 12 Stanislav Brabec 2024-04-17 16:43:01 UTC
Thorsten Kukuk, comment 10: As the new version did not reach SLE15 SP6 and ALP 1.0, what do you think about adding an upgrade protection scriptlets to lastlog2 in SLE15 SP6 and ALP 1.0? Something that will save these pam config files on removal?


Once in future, when everything < SLE15 SP5 and < ALP 1.0 will go outside the upgrade protection, util-linux could merge lastlog2 back to util-linux.
Comment 13 Thorsten Kukuk 2024-04-17 17:24:14 UTC
(In reply to Stanislav Brabec from comment #12)
> Thorsten Kukuk, comment 10: As the new version did not reach SLE15 SP6 and
> ALP 1.0, what do you think about adding an upgrade protection scriptlets to
> lastlog2 in SLE15 SP6 and ALP 1.0? Something that will save these pam config
> files on removal?

The pam-config files are generated on the fly if you call pam-config. You cannot save them. If you copy the old versions away and later back, you could miss other changes done in between by other packages (and would revert them) which means you can end up with either a non-working or an insecure setup.
The only scriplet called from util-linux after the lastlog2 %postun (and thus the config entry get's removed) is %posttrans, and this is far, far too late.

I discussed this with my team over several days: there is with the current RPM behavior and pam-config design no other solution.