diff options
-rw-r--r-- | lib/libpam/modules/pam_lastlog/pam_lastlog.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libpam/modules/pam_lastlog/pam_lastlog.c b/lib/libpam/modules/pam_lastlog/pam_lastlog.c index 4a7c3df..bf6ff54 100644 --- a/lib/libpam/modules/pam_lastlog/pam_lastlog.c +++ b/lib/libpam/modules/pam_lastlog/pam_lastlog.c @@ -149,7 +149,7 @@ pam_sm_open_session(pam_handle_t *pamh, int flags, int argc, const char **argv) if (tty == NULL) PAM_RETURN(PAM_SERVICE_ERR); - fd = open(_PATH_LASTLOG, O_RDWR, 0); + fd = open(_PATH_LASTLOG, O_RDWR|O_CREAT, 0644); if (fd == -1) { syslog(LOG_ERR, "cannot open %s: %m", _PATH_LASTLOG); PAM_RETURN(PAM_SERVICE_ERR); |