Bug 1151522
| Summary: | AVC when attempting to run X application in container | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Jan Pazdziora (Red Hat) <jpazdziora> |
| Component: | docker-io | Assignee: | Lokesh Mandvekar <lsm5> |
| Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 20 | CC: | admiller, dwalsh, golang-updates, hushan.jia, jpazdziora, jperrin, lsm5, mattdm, mgoldman, s, thrcka, vbatts |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-10-11 15:39:54 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
Jan Pazdziora (Red Hat)
2014-10-10 15:24:13 UTC
You are bind mounting a random directory into a container, in order to get this to work, you have to label the directory with something that a container can write or extend the policy. We don't want the container processes to be able to write to the X Server by default, so this is blocked. You can disable SELinux currently using --permissive flag at Runtime. Soon you will be able to disable only SELinux using --security-opt label:disable Or you could add the rules using audit2allow. This is not really an expected use case for docker, and I would argue that sandbox -X -t sandbox_web_t firefox is a better way to run a contained firefox. (In reply to Daniel Walsh from comment #1) > You are bind mounting a random directory into a container, in order to get > this to work, you have to label the directory with something that a > container can write or extend the policy. Wouldn't it make sense to have a boolean in the policy? |