summaryrefslogtreecommitdiffstats
path: root/loginrec.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2003-04-09 13:12:52 +0200
committerDamien Miller <djm@mindrot.org>2003-04-09 13:12:52 +0200
commit405dc604f8c6274153bf13be7e25e1979bd557e2 (patch)
treeb509d7cf214e8392f44090e4f2b7057ebb237632 /loginrec.c
parent - (djm) Fix missed log => logit occurance (reference by function pointer) (diff)
downloadopenssh-405dc604f8c6274153bf13be7e25e1979bd557e2.tar.xz
openssh-405dc604f8c6274153bf13be7e25e1979bd557e2.zip
- (djm) Bug #539: Specify creation mode with O_CREAT for lastlog. Report
from matth@eecs.berkeley.edu
Diffstat (limited to 'loginrec.c')
-rw-r--r--loginrec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/loginrec.c b/loginrec.c
index 38e1d8e82..224a7474e 100644
--- a/loginrec.c
+++ b/loginrec.c
@@ -163,7 +163,7 @@
#include "log.h"
#include "atomicio.h"
-RCSID("$Id: loginrec.c,v 1.49 2003/04/09 10:59:49 djm Exp $");
+RCSID("$Id: loginrec.c,v 1.50 2003/04/09 11:12:52 djm Exp $");
#ifdef HAVE_UTIL_H
# include <util.h>
@@ -1453,7 +1453,7 @@ lastlog_openseek(struct logininfo *li, int *fd, int filemode)
return 0;
}
- *fd = open(lastlog_file, filemode);
+ *fd = open(lastlog_file, filemode, 0600);
if ( *fd < 0) {
debug("lastlog_openseek: Couldn't open %s: %s",
lastlog_file, strerror(errno));
@@ -1483,7 +1483,7 @@ lastlog_perform_login(struct logininfo *li)
/* create our struct lastlog */
lastlog_construct(li, &last);
- if (!lastlog_openseek(li, &fd, O_RDWR|O_CREAT, 0600))
+ if (!lastlog_openseek(li, &fd, O_RDWR|O_CREAT))
return(0);
/* write the entry */