757d3aed85
- update the audit-grantor patch with the upstream changes - pam_userdb: correct the example in man page (#1078784) - pam_limits: check whether the utmp login entry is valid (#1080023) - pam_console_apply: do not print error if console.perms.d is empty - pam_limits: nofile refers to open file descriptors (#1111220) - apply PIE and full RELRO to all binaries built
38 lines
1.4 KiB
Diff
38 lines
1.4 KiB
Diff
diff -up Linux-PAM-1.1.8/modules/pam_lastlog/pam_lastlog.c.uninitialized Linux-PAM-1.1.8/modules/pam_lastlog/pam_lastlog.c
|
|
--- Linux-PAM-1.1.8/modules/pam_lastlog/pam_lastlog.c.uninitialized 2013-06-18 16:11:21.000000000 +0200
|
|
+++ Linux-PAM-1.1.8/modules/pam_lastlog/pam_lastlog.c 2014-08-25 16:44:24.365174752 +0200
|
|
@@ -350,6 +350,8 @@ last_login_write(pam_handle_t *pamh, int
|
|
return PAM_SERVICE_ERR;
|
|
}
|
|
|
|
+ memset(&last_login, 0, sizeof(last_login));
|
|
+
|
|
/* set this login date */
|
|
D(("set the most recent login time"));
|
|
(void) time(&ll_time); /* set the time */
|
|
@@ -364,14 +366,12 @@ last_login_write(pam_handle_t *pamh, int
|
|
}
|
|
|
|
/* copy to last_login */
|
|
- last_login.ll_host[0] = '\0';
|
|
strncat(last_login.ll_host, remote_host, sizeof(last_login.ll_host)-1);
|
|
|
|
/* set the terminal line */
|
|
terminal_line = get_tty(pamh);
|
|
|
|
/* copy to last_login */
|
|
- last_login.ll_line[0] = '\0';
|
|
strncat(last_login.ll_line, terminal_line, sizeof(last_login.ll_line)-1);
|
|
terminal_line = NULL;
|
|
|
|
@@ -628,7 +628,8 @@ pam_sm_authenticate(pam_handle_t *pamh,
|
|
lltime = (time(NULL) - lltime) / (24*60*60);
|
|
|
|
if (lltime > inactive_days) {
|
|
- pam_syslog(pamh, LOG_INFO, "user %s inactive for %d days - denied", user, lltime);
|
|
+ pam_syslog(pamh, LOG_INFO, "user %s inactive for %ld days - denied",
|
|
+ user, (long) lltime);
|
|
return PAM_AUTH_ERR;
|
|
}
|
|
|