Bug 924705 - SELinux is preventing /usr/libexec/gdm-session-worker from 'write' accesses on the directory etc.
SELinux is preventing /usr/libexec/gdm-session-worker from 'write' accesses o...
Status: CLOSED DUPLICATE of bug 924708
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
19
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
abrt_hash:d58b370186e1cd066c4d34f69ae...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-22 07:05 EDT by Jan Sedlák
Modified: 2013-03-22 09:28 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-03-22 09:28:09 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jan Sedlák 2013-03-22 07:05:11 EDT
Description of problem:
Tried to log in as a new user for the first time.
SELinux is preventing /usr/libexec/gdm-session-worker from 'write' accesses on the directory etc.

*****  Plugin catchall_labels (83.8 confidence) suggests  ********************

If you want to allow gdm-session-worker to have write access on the etc directory
Then you need to change the label on etc
Do
# semanage fcontext -a -t FILE_TYPE 'etc'
where FILE_TYPE is one of the following: admin_home_t, auth_cache_t, auth_home_t, cache_home_t, cgroup_t, config_home_t, data_home_t, dbus_home_t, faillog_t, fonts_cache_t, gconf_home_t, gnome_home_t, gstreamer_home_t, httpd_user_content_t, httpd_user_script_exec_t, icc_data_home_t, init_var_run_t, krb5_host_rcache_t, locale_t, mozilla_plugin_tmpfs_t, pam_var_console_t, pam_var_run_t, root_t, systemd_passwd_var_run_t, telepathy_cache_home_t, telepathy_data_home_t, tmp_t, tmpfs_t, user_fonts_t, user_home_dir_t, user_home_t, user_tmp_t, user_tmpfs_t, var_auth_t, var_lib_t, var_lock_t, var_log_t, var_run_t, var_spool_t, var_t, virt_home_t, xdm_home_t, xdm_log_t, xdm_rw_etc_t, xdm_spool_t, xdm_tmp_t, xdm_tmpfs_t, xdm_var_lib_t, xdm_var_run_t, xkb_var_lib_t, xserver_log_t. 
Then execute: 
restorecon -v 'etc'


*****  Plugin catchall (17.1 confidence) suggests  ***************************

If you believe that gdm-session-worker should be allowed write access on the etc 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:etc_t:s0
Target Objects                etc [ dir ]
Source                        gdm-session-wor
Source Path                   /usr/libexec/gdm-session-worker
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           gdm-3.7.92-2.fc19.x86_64
Target RPM Packages           filesystem-3.2-7.fc19.x86_64
Policy RPM                    selinux-policy-3.12.1-23.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 3.9.0-0.rc3.git0.5.fc20.x86_64 #1
                              SMP Tue Mar 19 01:25:41 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-03-22 06:54:49 EDT
Last Seen                     2013-03-22 06:54:49 EDT
Local ID                      ea33782d-c9af-4007-8c4f-7c34d41d3a9d

Raw Audit Messages
type=AVC msg=audit(1363949689.874:320): avc:  denied  { write } for  pid=2605 comm="gdm-session-wor" name="etc" dev="dm-0" ino=131073 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:etc_t:s0 tclass=dir


type=AVC msg=audit(1363949689.874:320): avc:  denied  { add_name } for  pid=2605 comm="gdm-session-wor" name="nshadow" scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:etc_t:s0 tclass=dir


type=AVC msg=audit(1363949689.874:320): avc:  denied  { create } for  pid=2605 comm="gdm-session-wor" name="nshadow" scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:shadow_t:s0 tclass=file


type=AVC msg=audit(1363949689.874:320): avc:  denied  { write } for  pid=2605 comm="gdm-session-wor" path="/etc/nshadow" dev="dm-0" ino=163367 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:shadow_t:s0 tclass=file


type=SYSCALL msg=audit(1363949689.874:320): arch=x86_64 syscall=open success=yes exit=EFAULT a0=7f92fc72e972 a1=241 a2=1b6 a3=0 items=0 ppid=2522 pid=2605 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) 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,etc_t,dir,write

audit2allow

#============= xdm_t ==============
allow xdm_t etc_t:dir { write add_name };
allow xdm_t shadow_t:file { write create };

audit2allow -R
require {
	type xdm_t;
}

#============= xdm_t ==============
auth_manage_shadow(xdm_t)
iptables_etc_filetrans_config(xdm_t)


Additional info:
hashmarkername: setroubleshoot
kernel:         3.9.0-0.rc3.git0.5.fc20.x86_64
type:           libreport
Comment 1 Miroslav Grepl 2013-03-22 09:28:09 EDT

*** This bug has been marked as a duplicate of bug 924708 ***

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