Bug 435526

Summary: patch resets SELinux contexts
Product: Red Hat Enterprise Linux 5 Reporter: Max Kanat-Alexander <mkanat>
Component: patchAssignee: Tim Waugh <twaugh>
Status: CLOSED DUPLICATE QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.1   
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-06-16 09:21:47 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 Max Kanat-Alexander 2008-02-29 22:48:33 UTC
Whenever I use patch, it resets the contexts of all the files it touches to 
user_u:object_r:tmp_t:s0. I'm using it by applying a diff from stdin, if that
makes a difference.

This is particularly difficult since it resets the contexts even when you're a
non-root user, but restorecon is only in root's path.

Comment 1 Max Kanat-Alexander 2008-02-29 22:49:23 UTC
Oh, by the way, I think patch in more recent versions of Fedora doesn't do
this--it's only been happening to me in RHEL 5 (and in RHEL 4 before that).

Comment 3 Tim Waugh 2008-06-16 09:21:47 UTC

*** This bug has been marked as a duplicate of 229329 ***