Bug 924708 - SELinux is preventing /usr/libexec/gdm-session-worker from 'remove_name' accesses on the directory nshadow.
SELinux is preventing /usr/libexec/gdm-session-worker from 'remove_name' acce...
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: gdm (Show other bugs)
19
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Ray Strode [halfline]
Fedora Extras Quality Assurance
abrt_hash:8e8878633228d13a0ac0d5e24b6...
:
: 924699 924705 924707 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-22 07:07 EDT by Jan Sedlák
Modified: 2015-02-17 09:53 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-02-17 09:53:55 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Jan Sedlák 2013-03-22 07:07:23 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 'remove_name' accesses on the directory nshadow.

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

If you want to allow gdm-session-worker to have remove_name access on the nshadow directory
Then you need to change the label on nshadow
Do
# semanage fcontext -a -t FILE_TYPE 'nshadow'
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 'nshadow'


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

If you believe that gdm-session-worker should be allowed remove_name access on the nshadow 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                nshadow [ 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           
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                      2f7d0d19-d7c2-45a3-8b24-a7ce8f5f0043

Raw Audit Messages
type=AVC msg=audit(1363949689.881:322): avc:  denied  { remove_name } for  pid=2605 comm="gdm-session-wor" name="nshadow" dev="dm-0" ino=163367 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.881:322): avc:  denied  { rename } for  pid=2605 comm="gdm-session-wor" name="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=AVC msg=audit(1363949689.881:322): avc:  denied  { unlink } for  pid=2605 comm="gdm-session-wor" name="shadow" dev="dm-0" ino=168482 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.881:322): arch=x86_64 syscall=rename success=yes exit=0 a0=7f92fc72e972 a1=7f92fc72e8fc a2=7f93064377d8 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,remove_name

audit2allow

#============= xdm_t ==============
allow xdm_t etc_t:dir remove_name;
allow xdm_t shadow_t:file { rename unlink };

audit2allow -R
require {
	type xdm_t;
}

#============= xdm_t ==============
auth_manage_shadow(xdm_t)
files_delete_etc_dir_entry(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:27:55 EDT
*** Bug 924707 has been marked as a duplicate of this bug. ***
Comment 2 Miroslav Grepl 2013-03-22 09:28:09 EDT
*** Bug 924705 has been marked as a duplicate of this bug. ***
Comment 3 Miroslav Grepl 2013-03-22 09:29:13 EDT
And you also see

type=AVC msg=audit(1363949689.844:319): avc:  denied  { write } for  pid=2605 comm="gdm-session-wor" name=".pwd.lock" dev="dm-0" ino=144564 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:passwd_file_t:s0 tclass=file


type=SYSCALL msg=audit(1363949689.844:319): arch=x86_64 syscall=open success=yes exit=EACCES a0=7f93061fa27f a1=80041 a2=180 a3=30633a30732d3073 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,passwd_file_t,file,write

audit2allow

#============= xdm_t ==============
allow xdm_t passwd_file_t:file write;

audit2allow -R
require {
	type xdm_t;
}

#============= xdm_t ==============
auth_manage_passwd(xdm_t)
Comment 4 Miroslav Grepl 2013-03-22 09:29:24 EDT
*** Bug 924699 has been marked as a duplicate of this bug. ***
Comment 5 Miroslav Grepl 2013-03-22 10:14:18 EDT
>Tried to log in as a new user for the first time.

After install? Or did you just add a user without password setup?
Comment 6 Daniel Walsh 2013-03-22 11:44:42 EDT
Did xdm try to reset a password at login?
Comment 7 Jan Sedlák 2013-03-22 11:52:39 EDT
I have booted live DVD, added new user, but set password to "ask for password on first login" and then logged on.
Comment 8 Daniel Walsh 2013-03-25 10:02:36 EDT
Is gdm manipulating the /etc/shadow directly?
Comment 9 Igor Gnatenko 2013-04-23 14:10:04 EDT
Description of problem:
1. Create user in gnome-control-center user-accounts
2. In field password use "Choose password at next login"
3. Switch to new user in GDM
4. AVC

Additional info:
hashmarkername: setroubleshoot
kernel:         3.9.0-0.rc5.git1.301.fc19.x86_64
type:           libreport
Comment 10 Daniel Walsh 2013-04-24 13:35:39 EDT
Can gdm use a helper app for this like sshd does?


/usr/sbin/unix_update
Comment 11 Igor Gnatenko 2013-05-15 18:28:32 EDT
Not reproduced.
I think that can close bug.
Comment 12 Fedora End Of Life 2015-01-09 12:48:32 EST
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 13 Fedora End Of Life 2015-02-17 09:53:55 EST
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

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