Bug 1264988

Summary: Need policy for rpm-ostree daemon mode - talks with dbus
Product: [Fedora] Fedora Reporter: Dusty Mabe <dustymabe>
Component: selinux-policy-targetedAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Ben Levenson <benl>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 23CC: dwalsh, walters
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: selinux-policy-3.13.1-148.fc23 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-10-13 00:05:23 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:

Description Dusty Mabe 2015-09-21 20:22:04 UTC
Description of problem:

I get a denial when building an ostree using `rpm-ostree-toolbox treecompose -c fedora-atomic/config.ini`. I was told this is because rpm-ostree now has a daemon mode that uses dbus and asked to file a bug. The result of the compose when the compose fails is: 

"error: Error -1 running transaction"

The denial text from the journal is listed below:

###################
Sep 21 18:20:50 f23alpha audit[438]: USER_AVC pid=438 uid=81 auid=4294967295 ses=4294967295 subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc:  denied  { send_msg } for msgtype=method_return dest=:1.25 spid=456 tpid=17439 scontext=system_u:system_r:systemd_logind_t:s0 tcontext=unconfined_u:system_r:install_t:s0-s0:c0.c1023 tclass=dbus
                                      exe="/usr/bin/dbus-daemon" sauid=81 hostname=? addr=? terminal=?'
###################

Version-Release number of selected component (if applicable):
Fedora 23 (pre release):
[root@f23alpha ~]# rpm -q rpm-ostree rpm-ostree-toolbox selinux-policy
rpm-ostree-2015.9-2.fc23.x86_64
rpm-ostree-toolbox-2015.8-4.fc23.x86_64
selinux-policy-3.13.1-144.fc23.noarch


How reproducible:
Always

Steps to Reproduce:
1. rpm-ostree-toolbox treecompose -c fedora-atomic/config.ini

Sorry I don't have any more right now but it is complicated to set this stuff up. If you need help please ask in comments.


Actual results:
Denial

Expected results:
No denial.

Additional info:
With selinux disabled the compose works. With it permissive the build still fails.

Comment 1 Colin Walters 2015-09-21 20:29:19 UTC
rpm-ostree has a daemon mode now, and will speak to polkit/logind for authorization.

Comment 2 Miroslav Grepl 2015-09-22 09:29:14 UTC
https://github.com/fedora-selinux/selinux-policy/commit/954f60c00f6357af5320c4ee9f81944e5bc424ae

commit 954f60c00f6357af5320c4ee9f81944e5bc424ae
Author: Miroslav Grepl <mgrepl>
Date:   Tue Sep 22 11:25:20 2015 +0200

    rpm-ostree has a daemon mode now and need to speak to polkit/logind for authorization. BZ(#1264988)

Comment 3 Fedora Update System 2015-10-09 14:14:46 UTC
selinux-policy-3.13.1-150.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-f4305656a5

Comment 4 Fedora Update System 2015-10-11 08:25:49 UTC
selinux-policy-3.13.1-150.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update selinux-policy'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-f4305656a5

Comment 5 Fedora Update System 2015-10-13 00:05:06 UTC
selinux-policy-3.13.1-150.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.