Bug 132196

Summary: vipw mislabels /etc/passwd on SE Linux thus breaking the entire system
Product: [Fedora] Fedora Reporter: Russell Coker <russell>
Component: util-linuxAssignee: Elliot Lee <sopwith>
Status: CLOSED RAWHIDE QA Contact: Ben Levenson <benl>
Severity: high Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 2.12a-8 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-09-15 13:23:41 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 130887, 131774    

Description Russell Coker 2004-09-09 15:41:45 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (compatible; Konqueror/3.3; Linux) (KHTML, like Gecko)

Description of problem:
When vipw creates a new /etc/passwd file it must first read the context of the old file and apply it to the new one.

Otherwise the file gets type shadow_t which is only readable by about a dozen programs and the system becomes almost unusable (will not boot correctly or allow logins).

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


How reproducible:
Always

Steps to Reproduce:
Run SE Linux with strict policy, run "vipw" and make some changes.

Actual Results:  # ls -lZ /etc/passwd
-rw-r--r--  0  root system_u:object_r:shadow_t       /etc/passwd


Expected Results:  #ls -lZ /etc/passwd
-rw-r--r--  root root system_u:object_r:etc_t          /etc/passwd


Additional info:
Comment 1 Nalin Dahyabhai 2004-09-15 13:23:41 EDT
The code to do this was there but not enabled.  Fixing in 2.12a-8.