Make patch SELinux compatible

Stephen Smalley sds at tycho.nsa.gov
Thu May 20 11:51:20 UTC 2010


On Thu, 2010-05-20 at 07:15 -0400, Vadym Chepkov wrote:
> Hi,
> 
> Is there a way to make patch in Redhat SELinux compatible?
> 
> # ls -Z php.php 
> -rw-r--r--  root root user_u:object_r:httpd_sys_content_t:s0 php.php
> 
> # patch -p1 < /root/php.patch
> patching file php.php
> 
> # ls -Z php.php 
> -rw-r--r--  root root user_u:object_r:tmp_t:s0         php.php

https://bugzilla.redhat.com/show_bug.cgi?id=229329

But I had thought that this had been fixed in Fedora.  Maybe not.
I'd suggest filing a bug against Fedora for it.  There is a
patch-selinux.patch in the patch .src.rpm so it seems like they did
support this functionality at one time, but perhaps it has broken again.

Tip: Make sure you stop restorecond before testing, as otherwise it may
interfere with the results.

-- 
Stephen Smalley
National Security Agency



More information about the selinux mailing list