diff options
Diffstat (limited to 'login-utils')
-rw-r--r-- | login-utils/login.1 | 11 | ||||
-rw-r--r-- | login-utils/login.c | 3 |
2 files changed, 14 insertions, 0 deletions
diff --git a/login-utils/login.1 b/login-utils/login.1 index b73eae147..084f6c90a 100644 --- a/login-utils/login.1 +++ b/login-utils/login.1 @@ -256,6 +256,17 @@ to change directory to her home. The default value is .IR yes . .RE .PP +.B LASTLOG_UID_MAX +(unsigned number) +.RS 4 +Highest user ID number for which the lastlog entries should be +updated. As higher user IDs are usually tracked by remote user +identity and authentication services there is no need to create +a huge sparse lastlog file for them. No LASTLOG_UID_MAX option +present in the configuration means that there is no user ID limit +for writing lastlog entries. +.RE +.PP .B LOG_UNKFAIL_ENAB (boolean) .RS 4 diff --git a/login-utils/login.c b/login-utils/login.c index 23b62b8d0..ab819f16f 100644 --- a/login-utils/login.c +++ b/login-utils/login.c @@ -503,6 +503,9 @@ static void log_lastlog(struct login_context *cxt) if (!cxt->pwd) return; + if (cxt->pwd->pw_uid > (uid_t) getlogindefs_num("LASTLOG_UID_MAX", ULONG_MAX)) + return; + /* lastlog is huge on systems with large UIDs, ignore SIGXFSZ */ memset(&sa, 0, sizeof(sa)); sa.sa_handler = SIG_IGN; |