Bug 1395568 - mock and confined users (staff_t)
Summary: mock and confined users (staff_t)
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 27
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-16 08:57 UTC by Jakub Jelen
Modified: 2018-11-30 22:33 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-11-30 22:33:23 UTC
Type: Bug


Attachments (Terms of Use)

Description Jakub Jelen 2016-11-16 08:57:41 UTC
Description of problem:
The mock does not work if the user is confined. Similar issues come with fedora-review tool.

Version-Release number of selected component (if applicable):
selinux-policy-3.13.1-191.20.fc24.noarch
mock-1.2.21-1.fc24.noarch

How reproducible:
always

Steps to Reproduce:
1. Set up your confined user (staff_t)
2. Run mock build of your favorite package

Actual results:
see a lot of selinux denials and mock is failing (unless in permissive domain)

Expected results:
mock working for confined users

Additional info:
Related AVC messages from setroubleshoot (filtred out the ones related to booleans):

#Hash: dnf,mock_t,gpg_exec_t,file,read,open
type=AVC msg=audit(1479283417.191:468): avc:  denied  { read open } for  pid=9343 comm="dnf" path="/usr/bin/gpg2" dev="dm-3" ino=1505198 scontext=staff_u:staff_r:mock_t:s0 tcontext=system_u:object_r:gpg_exec_t:s0 tclass=file permissive=1

#Hash: mock,mock_t,net_conf_t,file,relabelto
type=AVC msg=audit(1479283400.741:459): avc:  denied  { relabelto } for  pid=9255 comm="mock" name="resolv.conf" dev="dm-3" ino=1336080 scontext=staff_u:staff_r:mock_t:s0 tcontext=system_u:object_r:net_conf_t:s0 tclass=file permissive=1

#Hash: mock,mock_t,config_home_t,file,ioctl
type=AVC msg=audit(1479283400.323:452): avc:  denied  { ioctl } for  pid=9259 comm="mock" path="/home/jjelen/.config/mock.cfg" dev="dm-7" ino=2396299 ioctlcmd=0x5401 scontext=staff_u:staff_r:mock_t:s0 tcontext=staff_u:object_r:config_home_t:s0 tclass=file permissive=1

#Hash: mock,mock_t,config_home_t,file,open
type=AVC msg=audit(1479283400.323:451): avc:  denied  { open } for  pid=9259 comm="mock" path="/home/jjelen/.config/mock.cfg" dev="dm-7" ino=2396299 scontext=staff_u:staff_r:mock_t:s0 tcontext=staff_u:object_r:config_home_t:s0 tclass=file permissive=1

#Hash: mock,mock_t,config_home_t,file,read
type=AVC msg=audit(1479283400.323:450): avc:  denied  { read } for  pid=9259 comm="mock" name="mock.cfg" dev="dm-7" ino=2396299 scontext=staff_u:staff_r:mock_t:s0 tcontext=staff_u:object_r:config_home_t:s0 tclass=file permissive=1

#Hash: mock,mock_t,config_home_t,file,getattr
type=AVC msg=audit(1479283400.320:449): avc:  denied  { getattr } for  pid=9255 comm="mock" path="/home/jjelen/.config/mock.cfg" dev="dm-7" ino=2396299 scontext=staff_u:staff_r:mock_t:s0 tcontext=staff_u:object_r:config_home_t:s0 tclass=file permissive=1

#Hash: mock,mock_t,net_conf_t,file,unlink
type=AVC msg=audit(1479283722.23:500): avc:  denied  { unlink } for  pid=9255 comm="mock" name="hosts" dev="dm-3" ino=1336270 scontext=staff_u:staff_r:mock_t:s0 tcontext=system_u:object_r:net_conf_t:s0 tclass=file permissive=1

#Hash: dnf,mock_t,system_dbusd_var_run_t,sock_file,write
type=AVC msg=audit(1479283520.236:486): avc:  denied  { write } for  pid=9712 comm="dnf" name="system_bus_socket" dev="tmpfs" ino=19004 scontext=staff_u:staff_r:mock_t:s0 tcontext=system_u:object_r:system_dbusd_var_run_t:s0 tclass=sock_file permissive=1

#Hash: dnf,mock_t,cert_t,dir,write
type=AVC msg=audit(1479283512.356:484): avc:  denied  { write } for  pid=9712 comm="dnf" name="nssdb" dev="dm-3" ino=1048840 scontext=staff_u:staff_r:mock_t:s0 tcontext=system_u:object_r:cert_t:s0 tclass=dir permissive=1

#Hash: mock,mock_t,locale_t,file,relabelto
type=AVC msg=audit(1479283400.748:460): avc:  denied  { relabelto } for  pid=9255 comm="mock" name="localtime" dev="dm-3" ino=1336385 scontext=staff_u:staff_r:mock_t:s0 tcontext=system_u:object_r:locale_t:s0 tclass=file permissive=1



#Fedora review:
#Hash: mock,staff_consolehelper_t,user_home_t,file,write
type=AVC msg=audit(1478875725.639:6945): avc:  denied  { write } for  pid=18338 comm="mock" path="/home/jjelen/Downloads/sctests/1394275-librdkafka/review.txt" dev="dm-7" ino=2518150 scontext=staff_u:staff_r:staff_consolehelper_t:s0 tcontext=staff_u:object_r:user_home_t:s0 tclass=file permissive=0

#Hash: mock,staff_consolehelper_t,cache_home_t,file,write
type=AVC msg=audit(1478875725.639:6946): avc:  denied  { write } for  pid=18338 comm="mock" path="/home/jjelen/.cache/fedora-review.log" dev="dm-7" ino=2379051 scontext=staff_u:staff_r:staff_consolehelper_t:s0 tcontext=staff_u:object_r:cache_home_t:s0 tclass=file permissive=0

Comment 1 Fedora End Of Life 2017-07-25 23:54:00 UTC
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. 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 EOL if it remains open with a Fedora  'version'
of '24'.

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.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 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 this bug is closed as described in the policy above.

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 2 Jan Kurik 2017-08-15 07:57:19 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 27 development cycle.
Changing version to '27'.

Comment 3 Ben Cotton 2018-11-27 14:38:07 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. 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
EOL if it remains open with a Fedora  'version' of '27'.

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.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 27 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 this bug is closed as described in the policy above.

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 4 Ben Cotton 2018-11-30 22:33:23 UTC
Fedora 27 changed to end-of-life (EOL) status on 2018-11-30. Fedora 27 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. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

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


Note You need to log in before you can comment on or make changes to this bug.