Bug 539 - open() requires 3 arguments when using O_CREAT
Summary: open() requires 3 arguments when using O_CREAT
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: sshd (show other bugs)
Version: -current
Hardware: All All
: P2 minor
Assignee: OpenSSH Bugzilla mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-08 11:12 AEST by Matt Harren
Modified: 2004-04-14 12:24 AEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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