Bug 745205 - SELinux is preventing /usr/libexec/gdm-session-worker from read, write access on the directory /home/hicham.
Summary: SELinux is preventing /usr/libexec/gdm-session-worker from read, write access...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 14
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:78bbd0fb75f...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-11 16:26 UTC by Hicham HAOUARI
Modified: 2011-10-11 18:42 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-10-11 18:42:33 UTC
Type: ---


Attachments (Terms of Use)

Description Hicham HAOUARI 2011-10-11 16:26:06 UTC
SELinux is preventing /usr/libexec/gdm-session-worker from read, write access on the directory /home/hicham.

*****  Plugin restorecon (82.4 confidence) suggests  *************************

If you want to fix the label. 
/home/hicham default label should be user_home_dir_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /home/hicham

*****  Plugin file (7.05 confidence) suggests  *******************************

If you think this is caused by a badly mislabeled machine.
Then you need to fully relabel.
Do
touch /.autorelabel; reboot

*****  Plugin file (7.05 confidence) suggests  *******************************

If you think this is caused by a badly mislabeled machine.
Then you need to fully relabel.
Do
touch /.autorelabel; reboot

*****  Plugin catchall_labels (4.59 confidence) suggests  ********************

If you want to allow gdm-session-worker to have read write access on the hicham directory
Then you need to change the label on /home/hicham
Do
# semanage fcontext -a -t FILE_TYPE '/home/hicham'
where FILE_TYPE is one of the following: user_fonts_t, user_tmpfs_t, tmpfs_t, xdm_spool_t, fonts_cache_t, user_tmp_t, auth_cache_t, xdm_tmpfs_t, var_spool_t, var_lib_t, var_run_t, xserver_log_t, xdm_tmp_t, var_log_t, xdm_log_t, gnome_home_type, pam_var_run_t, xdm_var_lib_t, xdm_var_run_t, gconf_home_t, pcscd_var_run_t, xkb_var_lib_t, xdm_rw_etc_t, xdm_home_t, pam_var_console_t, cgroup_t, var_lock_t, root_t, tmp_t, var_t, user_home_dir_t, locale_t, var_auth_t. 
Then execute: 
restorecon -v '/home/hicham'


*****  Plugin catchall (1.31 confidence) suggests  ***************************

If you believe that gdm-session-worker should be allowed read write access on the hicham directory by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep gdm-session-wor /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:xdm_t:s0-s0:c0.c1023
Target Context                system_u:object_r:file_t:s0
Target Objects                /home/hicham [ dir ]
Source                        gdm-session-wor
Source Path                   /usr/libexec/gdm-session-worker
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           gdm-2.32.1-2.fc14
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.7-44.fc14
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.35.14-97.fc14.i686 #1 SMP
                              Sat Sep 17 00:34:02 UTC 2011 i686 i686
Alert Count                   1
First Seen                    Tue 11 Oct 2011 01:25:14 PM WET
Last Seen                     Tue 11 Oct 2011 01:25:14 PM WET
Local ID                      71202082-9a22-45b2-acc7-ecc190abeaf6

Raw Audit Messages
type=AVC msg=audit(1318339514.825:26975): avc:  denied  { read write } for  pid=1847 comm="gdm-session-wor" name="hicham" dev=sda5 ino=2616321 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:file_t:s0 tclass=dir


type=SYSCALL msg=audit(1318339514.825:26975): arch=i386 syscall=access success=no exit=EACCES a0=8e47698 a1=7 a2=21d27c a3=8eb64c0 items=0 ppid=1783 pid=1847 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=1 comm=gdm-session-wor exe=/usr/libexec/gdm-session-worker subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 key=(null)

Hash: gdm-session-wor,xdm_t,file_t,dir,read,write

audit2allow

#============= xdm_t ==============
#!!!! The source type 'xdm_t' can write to a 'dir' of the following types:
# user_fonts_t, user_tmpfs_t, tmpfs_t, xdm_spool_t, fonts_cache_t, user_tmp_t, auth_cache_t, xdm_tmpfs_t, var_spool_t, var_lib_t, var_run_t, xserver_log_t, xdm_tmp_t, var_log_t, xdm_log_t, gnome_home_type, pam_var_run_t, xdm_var_lib_t, xdm_var_run_t, gconf_home_t, pcscd_var_run_t, xkb_var_lib_t, xdm_rw_etc_t, xdm_home_t, pam_var_console_t, cgroup_t, var_lock_t, root_t, tmp_t, var_t, user_home_dir_t, locale_t, var_auth_t

allow xdm_t file_t:dir { read write };

audit2allow -R

#============= xdm_t ==============
#!!!! The source type 'xdm_t' can write to a 'dir' of the following types:
# user_fonts_t, user_tmpfs_t, tmpfs_t, xdm_spool_t, fonts_cache_t, user_tmp_t, auth_cache_t, xdm_tmpfs_t, var_spool_t, var_lib_t, var_run_t, xserver_log_t, xdm_tmp_t, var_log_t, xdm_log_t, gnome_home_type, pam_var_run_t, xdm_var_lib_t, xdm_var_run_t, gconf_home_t, pcscd_var_run_t, xkb_var_lib_t, xdm_rw_etc_t, xdm_home_t, pam_var_console_t, cgroup_t, var_lock_t, root_t, tmp_t, var_t, user_home_dir_t, locale_t, var_auth_t

allow xdm_t file_t:dir { read write };

Comment 1 Daniel Walsh 2011-10-11 18:42:33 UTC
You need to add labels to your homedir.

restorecon -R -v /home


Note You need to log in before you can comment on or make changes to this bug.