mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-18 06:14:27 +00:00
Create /var/log/lastlog if it doesn't exist.
Submitted by: des
This commit is contained in:
parent
d5c6e8dee0
commit
c80f5647cb
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=90955
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue