Bug 1090661 - staff_t can't read mock build outputs
Summary: staff_t can't read mock build outputs
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-04-23 21:37 UTC by Garrett Holmstrom
Modified: 2014-05-01 22:29 UTC (History)
4 users (show)

Fixed In Version: selinux-policy-3.12.1-158.fc20
Clone Of:
Environment:
Last Closed: 2014-05-01 22:29:33 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Garrett Holmstrom 2014-04-23 21:37:52 UTC
Description of problem:
With F20's current version of selinux-policy I can at last use mock as staff_t, but now I can't access its build outputs.  The command ``cp -p /var/lib/mock/*/result/*.rpm .'' results in this (dontaudited) denial:

type=AVC msg=audit(1398287727.188:644): avc:  denied  { read } for  pid=26626 comm="zsh" name="mock" dev="dm-1" ino=1261 scontext=staff_u:staff_r:staff_t:s0-s0:c0.c1023 tcontext=system_u:object_r:mock_var_lib_t:s0 tclass=dir
type=SYSCALL msg=audit(1398287727.188:644): arch=c000003e syscall=257 success=no exit=-13 a0=ffffffffffffff9c a1=1ae9500 a2=90800 a3=0 items=0 ppid=15819 pid=26626 auid=1000 uid=1000 gid=100 euid=1000 suid=1000 fsuid=1000 egid=100 sgid=100 fsgid=100 ses=1 tty=pts6 comm="zsh" exe="/usr/bin/zsh" subj=staff_u:staff_r:staff_t:s0-s0:c0.c1023 key=(null)

mock_manage_lib_dirs(staff_t) seems to fix it for me.  That said, I can't say for sure whether or not that is the best choice of interface for fixing this bug.


Version-Release number of selected component (if applicable):
selinux-policy-3.12.1-153.fc20.noarch


Steps to Reproduce:
1. Set the mock_enable_homedirs boolean
2. As staff_t, use mock to build an rpm
3. Attempt to copy the rpms out of the build's result directory


Additional info:
This appears similar, but not quite identical, to bug 1000642 from F18.

Comment 1 Miroslav Grepl 2014-04-24 12:32:44 UTC
commit c53b260d128bde37ffcb443f53519ed71e9888ce
Author: Miroslav Grepl <mgrepl>
Date:   Thu Apr 24 14:32:05 2014 +0200

    Fix mock_read_lib_files() interface

Comment 2 Fedora Update System 2014-04-25 12:44:02 UTC
selinux-policy-3.12.1-158.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-158.fc20

Comment 3 Fedora Update System 2014-04-26 09:24:35 UTC
Package selinux-policy-3.12.1-158.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.12.1-158.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-5660/selinux-policy-3.12.1-158.fc20
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2014-05-01 22:29:33 UTC
selinux-policy-3.12.1-158.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.


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