Bug 539

Summary: open() requires 3 arguments when using O_CREAT
Product: Portable OpenSSH Reporter: Matt Harren <matth>
Component: sshdAssignee: OpenSSH Bugzilla mailing list <openssh-bugs>
Status: CLOSED FIXED    
Severity: minor    
Priority: P2    
Version: -current   
Hardware: All   
OS: All   

Description Matt Harren 2003-04-08 11:12:06 AEST
In lastlog_openseek() in loginrec.c, the call to open(lastlog_file, filemode) 
should have a third parameter to specify the permissions if the file is 
created (0644?).  If the log file does not exist, it will be created since 
O_CREAT was passed to open, but the permissions will be set to whatever 
garbage value is on the end of the stack.  I've verified that this problem 
occurs on my system if lastlog_file does not exist.
Comment 1 Damien Miller 2003-04-09 19:40:51 AEST
fixed, thanks
Comment 2 Damien Miller 2004-04-14 12:24:19 AEST
Mass change of RESOLVED bugs to CLOSED