Bug 560488
| Summary: | SELinux is preventing /usr/libexec/gdm-simple-slave "read" access on /root/.Xdefaults. | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Richard Calmbach <rcalmbac> |
| Component: | selinux-policy | Assignee: | Miroslav Grepl <mgrepl> |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | low | ||
| Version: | 12 | CC: | dwalsh, mgrepl |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | setroubleshoot_trace_hash:b01b94576498da67aed6da29d362d33ee188c57b56c229858c55c9cdd0db46c5 | ||
| Fixed In Version: | 3.6.32-84.fc12 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2010-02-11 14:43:37 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Richard Calmbach
2010-01-31 22:33:30 UTC
Bug 505797 (reported against F11) seems to be related to this bug. Remove this file from the /root directory and it will stop complaining. I think this got created when you logged in as root via X? Well, sure, removing the file will get rid of the alert and one can make all kinds of arguments that running X as root is not advisable. However, that's a policy question that is orthogonal to the problem at hand. There may be legitimate reasons why root needs a .Xdefaults file. Also, the alert did not happen under F10 and suddenly started with F12, so something about the SELinux configuration has changed and the access denial is - I think - unintended. There have been lots of unintended SELinux access denials in the past where the solution was to revise the SELinux policy definitions - why not this time? Just to be sure: I put the .Xdefaults there deliberately. It contains my preferences for X properties such as xterm font and colors, keyboard shortcuts for window scrolling, etc. - just settings I rely on when running X (if that's as root it's only for rare troubleshooting purposes, but it has been useful before). FWIW: I noticed that every time I reboot another 7 occurrences of this alert are created but not when I start a graphical app, even when it requires entering the root password (e.g. a tool from the System->Administration menu). So, to summarize: I'm not disputing that root shouldn't run X. It just seems this access denial is not serving a useful purpose and may in fact be unintended. Ok, we could label it xdm_home_t. # semanage fcontext -a -t xdm_home_t /root/.Xdefaults # restorecon -R -v /root And then it the AVC will go away. This would allow a corrupted xdm to write to this file. We could label it with a gnome label gnome_home_t. Like these. /root/\.config(/.*)? gen_context(system_u:object_r:gnome_home_t,s0) /root/\.gconf(d)?(/.*)? gen_context(system_u:object_r:gconf_home_t,s0) /root/\.gnome2(/.*)? gen_context(system_u:object_r:gnome_home_t,s0) /root/\.local.* gen_context(system_u:object_r:gconf_home_t,s0) /root/\.pulse(/.*)? gen_context(system_u:object_r:gnome_home_t,s0) /root/\.gstreamer-.* gen_context(system_u:object_r:gstreamer_home_t,s0) And then xdm could read it. Or we can create a new label for it. xserver_conf_t? This sounds good. I don't know enough about SELinux or xdm to comment on the finer details of which approach is better but read access is probably sufficient. It's your call. For now Richard, just label it xdm_home_t chcon -t xdm_home_t /root/.Xdefaults Miroslav add /root/\.Xdefaults gen_context(system_u:object_r:gnome_home_t,s0) Fixed in selinux-policy-3.6.32-82.fc12 selinux-policy-3.6.32-82.fc12 has been submitted as an update for Fedora 12. http://admin.fedoraproject.org/updates/selinux-policy-3.6.32-82.fc12 selinux-policy-3.6.32-84.fc12 has been pushed to the Fedora 12 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 'yum --enablerepo=updates-testing update selinux-policy'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2010-1492 selinux-policy-3.6.32-84.fc12 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report. |