Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 86097 - Fopen hardcodes 0666 as mode
Summary: Fopen hardcodes 0666 as mode
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 7.3
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-03-13 21:34 UTC by William Au
Modified: 2007-04-18 16:52 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-03-14 20:44:04 UTC


Attachments (Terms of Use)

Description William Au 2003-03-13 21:34:33 UTC
Description of problem: 

Fopen hardcodes 0666 as mode.  So during an rpm install, the files created
will have a mode of 666 and thus can be overwritten by anyone on the system
until chmod() is called.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
    
Actual results:


Expected results:


Additional info:

Comment 1 Jeff Johnson 2003-03-14 20:44:04 UTC
No, files are created 0666 iff umask is 000, and that's
a configuration choice and/or problem.

Fopen calls open(2), and the mode passed to the system call
is adjusted by the current umask, typically 022, resulting
in mode 0644 for newly created files.




Note You need to log in before you can comment on or make changes to this bug.