lslogins: Add support for lastlog2#2735
Conversation
|
I don't like get_lastlog2() and original get_lastlog(). It would be nice to cache the lastlog entry in the |
Yes, you are right :-) I have added one. |
|
Hm, there are some issues in the build environments. E.G. fedora: |
|
For debian have a look at |
|
For Fedora maybe |
|
I do not get it: nothing provides liblastlog2.so.2()(64bit) needed by util-linux-2.40.rc1-4.20240125171921182063.pr2735.4.gbf7f26be8.fc40.x86_64 I cannot find any requirement in the *.spec file under: https://copr-dist-git.fedorainfracloud.org/git/packit/util-linux-util-linux-2735/util-linux in the given branch. Where is this requirement still defined ? |
|
I think the requirement is extracted from the actual |
|
The spec file is from the official Fedora rawhide, and it needs to be updated for v2.40-rc1. I'll update it ... |
|
BTW, we need to do something with login-utils/login.c. Now, it directly reads/writes to the classic last log file. This code should be optional (and enabled/disabled) independently on lastlog2 as you can replace it with old pam_lastlog or new pam_lastlog2. I suggest introducing #ifdef USE_LOGIN_LASTLOG and --enable-login-lastlog and making it disabled by default for the next release with some highlight warnings in ReleaseNotes. |
Ok, good point. Will do it... |
Have done it :-) |
|
The rpm-build:fedora-rawhide-* test does not pass because nothing on Fedora provides liblastlog2.so. I need to change it on Fedora. It is better than fixing it with some workaround in .packit.yaml. |
This PR based on Thorsten Kukuk's PR #2164.
I have adapted it to lastlog2 which is meanwhile included into util-linux.