<br clear="all"><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">I have a user application (the Reality/Pick database from Northgate Reality) that requires the creation of a user before install.</span><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
That user *must* have as their home directory : /usr/realman. Prior to F16 i used to do &quot;useradd -r -d /usr/realman -m realman&quot;.</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">On the most recent versions of Fedora this fails with :  &quot;useradd: cannot create directory /usr/realman&quot;.</div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
I get an AVN which is : &quot;</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Clivetime-&gt;Fri Feb  8 10:30:02 2013</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
type=SYSCALL msg=audit(1360319402.989:97): arch=c000003e syscall=83 success=no exit=-13 #============= useradd_t ==============<div>#!!!! The source type &#39;useradd_t&#39; can write to a &#39;dir&#39; of the following types:</div>
<div># selinux_config_t, stapserver_var_lib_t, user_home_dir_t, default_context_t, httpd_user_content_type, mail_spool_t, etc_t, semanage_tmp_t, config_home_t, var_t, semanage_store_t, selinux_login_config_t, httpd_user_script_exec_type, selinux_config_t, pcscd_var_run_t, tmp_t, user_home_type, semanage_store_t, file_context_t, home_root_t</div>
<div><br></div><div>allow useradd_t usr_t:dir write;</div> 7fff498c2639 a1=0 a2=7f26197f6750 a3=6165726373662f72 items=0 ppid=1855 pid=2277 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=1 tty=pts0 comm=&quot;useradd&quot; exe=&quot;/usr/sbin/useradd&quot; subj=unconfined_u:unconfined_r:useradd_t:s0-s0:c0.c1023 key=(null)</div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">type=AVC msg=audit(1360319402.989:97): avc:  denied  { write } for  pid=2277 comm=&quot;useradd&quot; name=&quot;usr&quot; dev=&quot;sda11&quot; ino=917505 scontext=unconfined_u:unconfined_r:useradd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:usr_t:s0 tclass=dir&quot;.</div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
Audit2why says : &quot;type=AVC msg=audit(1360319402.989:97): avc:  denied  { write } for  pid=2277 comm=&quot;useradd&quot; name=&quot;usr&quot; dev=&quot;sda11&quot; ino=917505 scontext=unconfined_u:unconfined_r:useradd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:usr_t:s0 tclass=dir</div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<span style="white-space:pre-wrap">        </span>Was caused by:</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><span style="white-space:pre-wrap">                </span>Missing type enforcement (TE) allow rule.</div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<span style="white-space:pre-wrap">                </span>You can use audit2allow to generate a loadable module to allow this access.</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
&quot;</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">and audit2allow says : &quot;</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">which I find confusing as it makes no reference to the /usr/realman or for that matter /usr directories.</div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
Please advise what I need to do to have it writeable by this application (which is closed source to which I have no access.</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Many thanks</div></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
Clive</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><br>