Bug 843603

Summary: xauth cannot open /dev/null while building libvncserver in mock with selinux enabled
Product: [Fedora] Fedora Reporter: David Aquilina <dwa>
Component: xorg-x11-xauthAssignee: X/OpenGL Maintenance List <xgl-maint>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: flanagan, frh+fedora, ppisar, rdieter, xgl-maint
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-01 18:13:13 UTC Type: Bug
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
libvncmock mock config none

Description David Aquilina 2012-07-26 18:16:29 UTC
Description of problem:

When building libvncserver with mock and SELinux enabled, the %check section fails to run and so the build fails. This has been reproduced on both the fedora for power build system ( https://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=631315 ) and also on a local host running the mock config pulled from the build system. 

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

Observed with libvncserver-0.9.8.2-4.fc17. 

FWIW, the ppc.koji builders are running mock-1.1.21-1.el6, I also reproduced it locally on f17 with mock-1.1.22-2.1.fc17. 

How reproducible:

always

Steps to Reproduce:
1. Run with SELinux enabled/enforcing
2. mock -r libvncmock --rebuild libvncserver-0.9.8.2-4.fc17.src.rpm
3.
  
Here are the SELinux errors seen during build: 

----
time->Thu Jul 26 17:57:51 2012
type=AVC msg=audit(1343339871.380:6032): avc:  denied  { append } for  pid=6515 comm="xauth" path="/dev/null" dev="dm-1" ino=1444979 scontext=unconfined_u:unconfined_r:xauth_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:mock_var_lib_t:s0 tclass=chr_file
----
time->Thu Jul 26 17:57:51 2012
type=AVC msg=audit(1343339871.380:6033): avc:  denied  { append } for  pid=6515 comm="xauth" path="/dev/null" dev="dm-1" ino=1444979 scontext=unconfined_u:unconfined_r:xauth_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:mock_var_lib_t:s0 tclass=chr_file
----

Additional info:

- So far this is the only package build failure which I've traced back to SELinux, so filing it against the package instead of mock itself for the moment. 

- libvncmock mock config will be attached.

Comment 1 David Aquilina 2012-07-26 18:18:44 UTC
Created attachment 600577 [details]
libvncmock mock config

Comment 2 Rex Dieter 2012-07-26 18:43:28 UTC
fair enough, I'll just mark those test as unconditionally non-fatal

%changelog
* Thu Jul 26 2012 Rex Dieter <rdieter> 0.9.9-3
- libvncserver fails to build in mock with selinux enabled (#843603)

Comment 3 Petr Pisar 2012-07-30 14:20:01 UTC
I can't understand why opening /dev/null by xauth for writing is forbidden. This is clash between xorg-x11-xauth and selinux-policy. We should not disable tests.

Comment 4 Frederik Holden 2013-02-25 19:39:36 UTC
I have also experienced this bug when doing "xvfb-run -a make test" on c++-gtk-utils in mock. I have opted to use the same solution as in libvncserver (make the test unconditionally non-fatal) until this bug is fixed.

Comment 5 Fedora End Of Life 2013-07-04 06:37:25 UTC
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 6 Fedora End Of Life 2013-08-01 18:13:18 UTC
Fedora 17 changed to end-of-life (EOL) status on 2013-07-30. Fedora 17 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.