Bug 901947 - SELinux is preventing /usr/sbin/useradd from 'write' accesses on the directory /run.
Summary: SELinux is preventing /usr/sbin/useradd from 'write' accesses on the director...
Keywords:
Status: CLOSED DUPLICATE of bug 841446
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 18
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:8c5c67a55921e85ffb9a052ab66...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-20 04:39 UTC by Bob Clayton
Modified: 2013-01-20 16:49 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-01-20 16:49:03 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Bob Clayton 2013-01-20 04:39:54 UTC
Description of problem:
SELinux is preventing /usr/sbin/useradd from 'write' accesses on the directory /run.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that useradd should be allowed write access on the run 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 useradd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:useradd_t:s0-s0:c0.c1023
Target Context                system_u:object_r:var_run_t:s0
Target Objects                /run [ dir ]
Source                        useradd
Source Path                   /usr/sbin/useradd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           shadow-utils-4.1.5.1-2.fc18.x86_64
Target RPM Packages           filesystem-3.1-2.fc18.x86_64
Policy RPM                    selinux-policy-3.11.1-71.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.7.2-201.fc18.x86_64 #1 SMP Fri
                              Jan 11 22:16:23 UTC 2013 x86_64 x86_64
Alert Count                   2
First Seen                    2013-01-19 22:17:28 CST
Last Seen                     2013-01-19 22:20:32 CST
Local ID                      4569533b-322e-4930-888f-78533d47aa54

Raw Audit Messages
type=AVC msg=audit(1358655632.920:5693): avc:  denied  { write } for  pid=21506 comm="useradd" name="/" dev="tmpfs" ino=6697 scontext=system_u:system_r:useradd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:var_run_t:s0 tclass=dir


type=SYSCALL msg=audit(1358655632.920:5693): arch=x86_64 syscall=mkdir success=no exit=EACCES a0=7fff1619bf1b a1=0 a2=7fdbea132750 a3=65726373662f7274 items=0 ppid=21503 pid=21506 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=useradd exe=/usr/sbin/useradd subj=system_u:system_r:useradd_t:s0-s0:c0.c1023 key=(null)

Hash: useradd,useradd_t,var_run_t,dir,write

audit2allow

#============= useradd_t ==============
#!!!! The source type 'useradd_t' can write to a 'dir' of the following types:
# semanage_tmp_t, pcscd_var_run_t, user_home_type, file_context_t, home_root_t, selinux_config_t, selinux_config_t, stapserver_var_lib_t, user_home_dir_t, default_context_t, httpd_user_content_type, mail_spool_t, etc_t, config_home_t, tmp_t, var_t, semanage_store_t, semanage_store_t, selinux_login_config_t, httpd_user_script_exec_type

allow useradd_t var_run_t:dir write;

audit2allow -R

#============= useradd_t ==============
#!!!! The source type 'useradd_t' can write to a 'dir' of the following types:
# semanage_tmp_t, pcscd_var_run_t, user_home_type, file_context_t, home_root_t, selinux_config_t, selinux_config_t, stapserver_var_lib_t, user_home_dir_t, default_context_t, httpd_user_content_type, mail_spool_t, etc_t, config_home_t, tmp_t, var_t, semanage_store_t, semanage_store_t, selinux_login_config_t, httpd_user_script_exec_type

allow useradd_t var_run_t:dir write;


Additional info:
hashmarkername: setroubleshoot
kernel:         3.7.2-201.fc18.x86_64
type:           libreport

Potential duplicate: bug 841446

Comment 1 Miroslav Grepl 2013-01-20 16:49:03 UTC

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


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