From fc0ed79e5d700b4a730235fe88e60951717edc6e Mon Sep 17 00:00:00 2001 From: Stanislav Brabec Date: Fri, 26 Jul 2019 21:39:42 +0200 Subject: [PATCH 1/3] usermod.c: Fix invalid variable name Fix invalid LASTLOG_MAX_UID variable name to correct LASTLOG_UID_MAX. Signed-off-by: Stanislav Brabec --- src/usermod.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/usermod.c b/src/usermod.c index c3718864..0ae50e34 100644 --- a/src/usermod.c +++ b/src/usermod.c @@ -1879,7 +1879,7 @@ static void update_lastlog (void) return; } - max_uid = (uid_t) getdef_ulong ("LASTLOG_MAX_UID", 0xFFFFFFFFUL); + max_uid = (uid_t) getdef_ulong ("LASTLOG_UID_MAX", 0xFFFFFFFFUL); if (user_newid > max_uid) { /* do not touch lastlog for large uids */ return; From 00a5cff2449356d516352a2e2a3bd26693334081 Mon Sep 17 00:00:00 2001 From: Stanislav Brabec Date: Fri, 26 Jul 2019 22:34:59 +0200 Subject: [PATCH 2/3] login.defs: Really add LASTLOG_UID_MAX However 46331648 mentions adding of LASTLOG_UID_MAX to login.defs, it did not happen. Signed-off-by: Stanislav Brabec --- etc/login.defs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/etc/login.defs b/etc/login.defs index eba4bde7..e527cdcb 100644 --- a/etc/login.defs +++ b/etc/login.defs @@ -31,6 +31,15 @@ LOG_OK_LOGINS no # LASTLOG_ENAB yes +# +# Limit the highest user ID number for which the lastlog entries should +# be updated. +# +# No LASTLOG_UID_MAX means that there is no user ID limit for writing +# lastlog entries. +# +#LASTLOG_UID_MAX + # # Enable checking and display of mailbox status upon login. # From 3025fefc41bf89c72024dc8d58a04839acc2ff0b Mon Sep 17 00:00:00 2001 From: Stanislav Brabec Date: Fri, 26 Jul 2019 22:47:05 +0200 Subject: [PATCH 3/3] login.defs: Cosmetic space change Fix formatting of login.defs comments. Variables are preceeded by "#" without space, comments are preceeded by "# ". It makes the file machine parseable again. Signed-off-by: Stanislav Brabec --- etc/login.defs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/login.defs b/etc/login.defs index e527cdcb..f235e1b4 100644 --- a/etc/login.defs +++ b/etc/login.defs @@ -341,8 +341,8 @@ CHFN_RESTRICT rwh # If only one of the MIN or MAX values is set, then this value will be used. # If MIN > MAX, the highest value will be used. # -# SHA_CRYPT_MIN_ROUNDS 5000 -# SHA_CRYPT_MAX_ROUNDS 5000 +#SHA_CRYPT_MIN_ROUNDS 5000 +#SHA_CRYPT_MAX_ROUNDS 5000 # # List of groups to add to the user's supplementary group set