Bug 120154

Summary: rpm and rpmbuild for non-root builds produce file_contexts errors
Product: [Fedora] Fedora Reporter: Gene Czarcinski <gczarcinski>
Component: policyAssignee: Daniel Walsh <dwalsh>
Status: CLOSED RAWHIDE QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: herrold, jbj, pgraner
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-04-06 14:53:41 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:
Attachments:
Description Flags
what I get when I run rpm -Uvh
none
what I get when I run rpmbuild none

Description Gene Czarcinski 2004-04-06 13:59:22 UTC
Description of problem:

It is possible this should be against rpm so I will cc him on this
report.  However, since if I "setenforce 0" the problem goes away (no
messages), I assume policy is involved.

I have a directory structure .rpmrc and .rpmmacros so that I can build
rpms as non-root ... the "safe" way (per Mike Harris stuff).  I am
able to build the policy rpms (policy-1.9.2-12).  However, when I run
the rpm -Uvh command to install the source and again when I run
rpmbuild -bi for building, I get lots and lots of messages of the form:

/etc/security/selinux/file_contexts:  invalid context
system_u:object_r:default_t on line number 39
/etc/security/selinux/file_contexts:  invalid context
system_u:object_r:root_t on line number 44
/etc/security/selinux/file_contexts:  invalid context
system_u:object_r:home_root_t on line number 53

I am attaching the redirected console logs for the rpm -Uvh and
rpmbuild -bi since they are a bit large.

Comment 1 Gene Czarcinski 2004-04-06 14:00:24 UTC
Created attachment 99142 [details]
what I get when I run rpm -Uvh

Comment 2 Gene Czarcinski 2004-04-06 14:01:23 UTC
Created attachment 99143 [details]
what I get when I run rpmbuild

Comment 3 Daniel Walsh 2004-04-06 14:24:07 UTC
No this is a bug in policy.  Policy needs 
can_getsecurity($1_t) added.

I have modified policy with this change in policy-1.9.2-13  
Available on people.  Or in tomorrows build.

Dan

Comment 4 Gene Czarcinski 2004-04-06 14:53:41 UTC
OK, 1.9.2-13 fixes things and I am closing this report ... if the fix
gets lost, I will reopen.