]> andersk Git - openssh.git/commitdiff
- (djm) Bug #539: Specify creation mode with O_CREAT for lastlog. Report
authordjm <djm>
Wed, 9 Apr 2003 11:12:52 +0000 (11:12 +0000)
committerdjm <djm>
Wed, 9 Apr 2003 11:12:52 +0000 (11:12 +0000)
   from matth@eecs.berkeley.edu

loginrec.c

index 98f4d1bc571493a3952f00a41b2ccc30e251d0a8..0710ab96fd021e4c37e4fb3a0dfac896777f8cba 100644 (file)
@@ -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 */
This page took 0.042695 seconds and 5 git commands to generate.