Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

login.defs: Add LASTLOG_UID_MAX variable to limit lastlog to small uids. #142

Merged
merged 2 commits into from Dec 10, 2018

Conversation

t8m
Copy link
Contributor

@t8m t8m commented Nov 28, 2018

As the large uids are usually provided by remote user identity and
authentication service, which also provide user login tracking,
there is no need to create a huge sparse file for them on every local
machine.

As the large uids are usually provided by remote user identity and
authentication service, which also provide user login tracking,
there is no need to create a huge sparse file for them on every local
machine.
@t8m
Copy link
Contributor Author

t8m commented Nov 28, 2018

If this is accepted, I will add the support also to pam_lastlog.

@karelzak
Copy link
Contributor

karelzak commented Nov 28, 2018

Cool, I'm going to support this feature in util-linux login.c too.

@t8m
Copy link
Contributor Author

t8m commented Dec 4, 2018

Ping @hallyn, what do you think about this?

@hallyn
Copy link
Member

hallyn commented Dec 8, 2018

Seems reasonable to me, thanks.

@hallyn
Copy link
Member

hallyn commented Dec 8, 2018

Well, but let me ask - would it seem more conservative to make the default, if the variable is unspecified, be 4294967295, i.e. so noone's behavior changes by default, then distros/packages can be encouraged to ship 99999 as the default in their default login.defs?

@t8m
Copy link
Contributor Author

t8m commented Dec 10, 2018

It works for me either way. If this conservative approach is preferred by you, please tell me and I will update the patch.

@t8m
Copy link
Contributor Author

t8m commented Dec 10, 2018

I've come to conclusion that the conservative approach is the right one. Pushed fixup commit.

@hallyn hallyn merged commit ec7ff1e into shadow-maint:master Dec 10, 2018
@hallyn
Copy link
Member

hallyn commented Dec 10, 2018

Thanks.

@glensc
Copy link
Contributor

glensc commented Dec 10, 2018

this got now merged with fixup! commit. should had git rebase --autosquash -i or use the github merge as squash feature.

@hallyn
Copy link
Member

hallyn commented Dec 10, 2018

Oh, in general I prefer for the submitter to do the git rebase. I don't like to mangle other people's submissions, though maybe I should... It's only been a few hours, I can rebase and force-push if you far prefer.

@t8m
Copy link
Contributor Author

t8m commented Dec 10, 2018

The fixup commits purpose is to be autosquashed, so please do.

@hallyn
Copy link
Member

hallyn commented Dec 10, 2018

Hm, never heard of those, though I see they are nowhere near new.

karelzak added a commit to util-linux/util-linux that referenced this pull request Jan 11, 2019
This new variable allows to keep lastlog file small and filter out
things like huge nfsnobody UIDs.

The variable is also supported by shadow-utils (adduser, etc.).

Addresses: shadow-maint/shadow#142
Signed-off-by: Karel Zak <kzak@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants