Bug 34295

Summary: dangerous umask
Product: [Retired] Red Hat Linux Reporter: Andreas J. Bathe <ajb>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED CURRENTRELEASE QA Contact: David Lawrence <dkl>
Severity: high Docs Contact:
Priority: high    
Version: 7.1CC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-04-04 05:58:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Andreas J. Bathe 2001-04-01 17:15:03 UTC
initscripts-5.78-1:

when seeing /etc/issue and /etc/issue.net with -rw-rw-rw- privileges I
found that the umask is set to 0 when the script rc.local is executed. I
mean that is a very dangerous umask. Everything created within the startup
scripts will be privileded with 666. Have a look within /var what a bunch
of files will have -rw-rw-rw-. Not very secure...

Take care
Andreas

Comment 1 Bill Nottingham 2001-04-02 03:05:09 UTC
I can't reproduce this here. /etc/issue* has 644 permissions.

Comment 2 Andreas J. Bathe 2001-04-03 16:04:24 UTC
It look's like a kernel issue: Please reproduce with the stock 2.4.3 kernel and
see what the umask within rc.local ist. Here I got good umask with the rawhide
kernel 2.4.2-0.1.28 and the bad one when exchanging it with the vanilla 2.4.3
kernel.

Take care
Andreas

Comment 3 Bill Nottingham 2001-04-04 05:56:35 UTC
Hm, this should probably actually be patched in init.

Comment 4 Bill Nottingham 2001-04-04 05:57:40 UTC
someone should try and reproduce this inhouse.

Comment 5 Bill Nottingham 2001-04-04 05:58:49 UTC
(Disregard that last comment. Too many windows open.)

Comment 6 Bill Nottingham 2001-08-07 07:00:19 UTC
This was patched into the init that shipped with 7.1.

AFAIK, the kernel change has been reverted since then anyway.