summaryrefslogtreecommitdiffstats
path: root/login-utils/login.c
diff options
context:
space:
mode:
Diffstat (limited to 'login-utils/login.c')
-rw-r--r--login-utils/login.c3
1 files changed, 3 insertions, 0 deletions
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;