Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1279430

Summary: cockpit-ws should be able to write to /run/cockpit-ws
Product: [Fedora] Fedora Reporter: Stef Walter <stefw>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 23CC: dominick.grift, dwalsh, jscotka, lvrabec, mgrepl, mvollmer, plautrba
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: selinux-policy-3.13.1-155.fc23 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1283955 (view as bug list) Environment:
Last Closed: 2015-11-26 20:57:59 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:
Bug Depends On:    
Bug Blocks: 1283955    

Description Stef Walter 2015-11-09 13:00:37 UTC
Description of problem:

Nov 09 07:53:45 localhost.localdomain kernel: type=1400 audit(1447073625.699:4): avc:  denied  { write } for  pid=2280 comm="ssh-transport-c" name="cockpit-ws" dev="tmpfs" ino=19561 scontext=system_u:system_r:cockpit_ws_t:s0 tcontext=system_u:object_r:var_run_t:s0 tclass=dir

cockpit-ws should be able to write to a /run/cockpit-ws directory.

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

selinux-policy-targeted-3.13.1-151.fc23.noarch

Comment 1 Daniel Walsh 2015-11-11 22:29:52 UTC
Looks like new functionality.

https://github.com/fedora-selinux/selinux-policy/pull/64

Cockpit should really carry its own policy package similar to docker.

Comment 2 Stef Walter 2015-11-12 05:45:15 UTC
(In reply to Daniel Walsh from comment #1)
> Looks like new functionality.

Yes, we are treating SELinux as any other dependency. First we get the API and changes we need from the lower level, before implementing the functionality in Cockpit.

> https://github.com/fedora-selinux/selinux-policy/pull/64

Commented on that pull request.

> Cockpit should really carry its own policy package similar to docker.

Even though using our own SELinux policy was a great way to get started ... it just started being problematic:

 1. Conflicts between the Cockpit SELinux policy and changes in the various
    Fedoras, mean that we would have had to carry a different SELinux policy
    for each targetted OS.

 2. Our testing used our custom SELinux policy and since users weren't installing
    it this led to false negatives, errors were hidden, and that's bad.

Comment 3 Miroslav Grepl 2015-11-12 10:09:44 UTC
We will create a document/blog where we want to talk about experiences and about advices how to do it or not.

With new userspace (Fedora23+) there is no problem to ship a policy with the same name because we have priorities here. The problems come up with RHEL7 and old Fedoras.

Comment 5 Daniel Walsh 2015-11-12 13:57:34 UTC
I am more concerned about RHEL then Fedora, since Fedora can have regular updates of selinux-policy it should not be a problem.  RHEL however will lag up to 6 months for an update.

Comment 6 Fedora Update System 2015-11-20 13:15:48 UTC
selinux-policy-3.13.1-155.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-0d84d6c75f

Comment 7 Fedora Update System 2015-11-22 14:25:58 UTC
selinux-policy-3.13.1-155.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-0d84d6c75f

Comment 8 Fedora Update System 2015-11-26 20:57:17 UTC
selinux-policy-3.13.1-155.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.