Bug 823232
Summary: | SELinux violation when running "sudo su -" | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Ignacio Vazquez-Abrams <ivazqueznet> |
Component: | selinux-policy | Assignee: | Miroslav Grepl <mgrepl> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 16 | CC: | dominick.grift, dwalsh, lovyagin, mgrepl |
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: | 2012-06-28 03:27:07 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
Ignacio Vazquez-Abrams
2012-05-20 04:33:52 UTC
What directory is xauth trying to write into? What were you doing when this happened? Have same bug here. Have fresh install of Fedora 17 + MATE DE. Appears each time I start su. probably /run/gdm/.* i do not see this problem here (its labeled xdm_var_run_t here) but then again i do not use su. ls -ldZ /run/gdm $ ls -ldZ /run/gfm ls: cannot access /run/gdm: No such file or directory $ ls -ldZ /run/mdm drwx--x--x. root mdm system_u:object_r:var_run_t:s0 /run/mdm $ What is mdm? Fixed in selinux-policy-3.10.0-129.fc17 semanage fcontext -a -t xdm_var_run_t '/var/run/mdm(/.*)?' restorecon -R -v /run Will fix for now. mdm is fork of GNOME 2 gdm (aka MATE display manager) yup, thanks, I see, will check now Daniel, looks like it helps, but context restores to initial after reboot, so fix is not permanent... ps -eZ | grep mdm chcon -t xdm_exec_t /usr/sbin/mdm # ps -eZ | grep mdm system_u:system_r:initrc_t:s0 497 ? 00:00:00 mdm-binary system_u:system_r:initrc_t:s0 621 ? 00:00:00 mdm-simple-slav system_u:system_r:initrc_t:s0 793 ? 00:00:00 mdm-session-wor unconfined_u:unconfined_r:unconfined_t:s0 1070 ? 00:00:00 mdm-user-switch # chcon -t xdm_exec_t /usr/sbin/mdm helps in this issue but produce a lot of other SElinux violation, will check chcon -t xdm_exec_t /usr/sbin/mdm-binary rpm -qlf /usr/sbin/mdm-binary You probably need to do fixes to /var/lib/mdm and /var/run/mdm and /var/log/mdm to match gdm labels. chcon -Rt xdm_var_run_t /run/mdm chcon -Rt xserver_log_t /var/log/mdm chcon -Rt xdm_var_lib_t /var/lib/mdm well, looks like chcon -t xdm_exec_t /usr/sbin/mdm chcon -t xdm_exec_t /usr/sbin/mdm-binary chcon -Rt xdm_var_lib_t /var/lib/mdm chcon -Rt xdm_log_t /var/log/mdm chcon -Rt xdm_var_lib_t /var/cache/mdm chcon -Rt xdm_etc_t /etc/mdm chcon -Rt xserver_log_t /var/mdm chcon -Rt xdm_etc_t /etc/gdm chcon -Rt xdm_etc_t /etc/gdm/custom.conf chcon -Rt xdm_unconfined_exec_t /etc/gdm/Init chcon -Rt xdm_unconfined_exec_t /etc/gdm/PostLogin chcon -Rt xdm_unconfined_exec_t /etc/gdm/PostSession chcon -Rt xdm_unconfined_exec_t /etc/gdm/PreSession chcon -t dbusd_etc_t /etc/dbus-1/system.d/mdm.conf chcon -Rt xdm_spool_t /var/spool/mdm is enough for mdm, looking forward how to semanage fcontext / restorecon it correctly inside LiveCD kickstart script... chcon -Rt xserver_log_t /var/mdm I have everyone except ^^ This should not be needed. mdm should not store its log files in this directory. Hm, I examined gdm-2.32.1-2.fc14.x86_64.rpm to find all that, I checked, it provides this (xserver_log_t) context for /var/gdm... Old version, probably should remove that labelling. selinux-policy-3.10.0-89.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-89.fc16 Package selinux-policy-3.10.0-89.fc16: * should fix your issue, * was pushed to the Fedora 16 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.10.0-89.fc16' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-9507/selinux-policy-3.10.0-89.fc16 then log in and leave karma (feedback). selinux-policy-3.10.0-89.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report. |