Skip to content

lslogins: Add support for lastlog2 (#2088)#2164

Closed
thkukuk wants to merge 1 commit intoutil-linux:masterfrom
thkukuk:lslogins-lastlog2
Closed

lslogins: Add support for lastlog2 (#2088)#2164
thkukuk wants to merge 1 commit intoutil-linux:masterfrom
thkukuk:lslogins-lastlog2

Conversation

@thkukuk
Copy link
Contributor

@thkukuk thkukuk commented Apr 14, 2023

lastlog2 is a Y2038 safe implementation of lastlog. If available, it should be preferred over the old lastlog variant.

@t-8ch
Copy link
Member

t-8ch commented Apr 15, 2023

@thkukuk
Copy link
Contributor Author

thkukuk commented Apr 17, 2023

I guess this is the correct liblastlog2 to use with this: https://github.com/thkukuk/lastlog2

Correct. Missed the other project with the similar name as it seems to be dead since 8 years already.

lastlog2 is a Y2038 safe implementation of lastlog.

Signed-off-by: Thorsten Kukuk <[email protected]>
@karelzak
Copy link
Collaborator

karelzak commented Jun 7, 2023

@thkukuk I have talked about lastlog2 with colleagues in Red Hat, and more people agree that it seems like a good way to go ;-) What's your plan for the project? ;-)

What about merging it to the util-linux? It will make it available almost everywhere; lslogins and login will be without extra dependence, and we can provide a replacement for lastlog from shadow-utils, and maintenance overhead will be smaller, etc. The "sad" thing is dependence on sqlite3, but for people who do not like it, we can introduce --disable/enable-lastlog2. What do you think?

(No problem if you want to keep it a small standalone project, just an idea ...)

@thkukuk
Copy link
Contributor Author

thkukuk commented Jun 7, 2023

Currently lastlog2 is a standalone project, but I have no problems with merging it with util-linux. Makes it more visible and more people will take care of it.

I agree with the sqlite3 dependency, but we discussed that a lot and in the end, it was the only library which did fulfill our needs, is well maintained and widely adopted.

@thkukuk
Copy link
Contributor Author

thkukuk commented Jun 7, 2023

I forgot: somebody needs to reformat the code to match the syntax format of util-linux, I still format my code with glibc syntax.

@thkukuk
Copy link
Contributor Author

thkukuk commented Jun 7, 2023

Between, openSUSE uses already lastlog2 as default, like our next generation enterprise products.

@thkukuk
Copy link
Contributor Author

thkukuk commented Jun 12, 2023

@karelzak How would you like to manage the merge of lastlog2 into util-linux? Who will do it? I have only limited time and not well familar with how the whole util-linux setup is done.

@karelzak
Copy link
Collaborator

@karelzak How would you like to manage the merge of lastlog2 into util-linux? Who will do it? I have only limited time and not well familar with how the whole util-linux setup is done.

I'll do it, but the next week. I guess we can merge it with minimal changes (add it to the build system) and then "clean up" with additional pull requests to make it consistent with the rest of util-linux.

@karelzak karelzak added the TODO We going to think about it ;-) label Jun 12, 2023
@karelzak
Copy link
Collaborator

Note I didn't forget, but I still have no time ...

Maybe, someone else can prepare a PR to merge lastlog2 into util-linux. The ideal way is to add liblastlog2/ directory, add the original code there (with minimal changes!), and the following patches "clean up" the code to be compatible with the rest of util-linux.

@schubi2
Copy link
Contributor

schubi2 commented Sep 4, 2023

Note I didn't forget, but I still have no time ...

Maybe, someone else can prepare a PR to merge lastlog2 into util-linux. The ideal way is to add liblastlog2/ directory, add the original code there (with minimal changes!), and the following patches "clean up" the code to be compatible with the rest of util-linux.

Hi, if you don't mind, I would like to integrate it. :-)

@karelzak
Copy link
Collaborator

It would be nice to rebase this PR and adapt it to liblastslog2 in the tree.

@thkukuk
Copy link
Contributor Author

thkukuk commented Jan 24, 2024

It would be nice to rebase this PR and adapt it to liblastslog2 in the tree.

I discussed this already with @schubi2 this morning, since I'm on sick leave he will try to look at this. Else it has to wait until I'm back.

@schubi2
Copy link
Contributor

schubi2 commented Jan 25, 2024

It would be nice to rebase this PR and adapt it to liblastslog2 in the tree.

I discussed this already with @schubi2 this morning, since I'm on sick leave he will try to look at this. Else it has to wait until I'm back.

I have submitted a new PR with the adaption to included lastlog2.

@thkukuk
Copy link
Contributor Author

thkukuk commented Jan 26, 2024

Closing in favor of PR #2735

@thkukuk thkukuk closed this Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

TODO We going to think about it ;-)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants