comparison loginrec.c @ 507:ada77f43c79a

Give a umask argument to open() in loginrec
author Matt Johnston <matt@ucc.asn.au>
date Wed, 05 Nov 2008 13:14:38 +0000
parents 6ba95762ec4e
children e0084f136cb8
comparison
equal deleted inserted replaced
506:910c2da71235 507:ada77f43c79a
1332 dropbear_log(LOG_WARNING, "lastlog_openseek: %.100s is not a file or directory!", 1332 dropbear_log(LOG_WARNING, "lastlog_openseek: %.100s is not a file or directory!",
1333 LASTLOG_FILE); 1333 LASTLOG_FILE);
1334 return 0; 1334 return 0;
1335 } 1335 }
1336 1336
1337 *fd = open(lastlog_file, filemode); 1337 *fd = open(lastlog_file, filemode, 0600);
1338 if ( *fd < 0) { 1338 if ( *fd < 0) {
1339 dropbear_log(LOG_INFO, "lastlog_openseek: Couldn't open %s: %s", 1339 dropbear_log(LOG_INFO, "lastlog_openseek: Couldn't open %s: %s",
1340 lastlog_file, strerror(errno)); 1340 lastlog_file, strerror(errno));
1341 return 0; 1341 return 0;
1342 } 1342 }