Nonstandard Homedir Label

Dominick Grift dominick.grift at gmail.com
Tue Sep 3 07:42:15 UTC 2013


On Mon, 2013-09-02 at 19:53 +0200, Robert Gabriel wrote:
> Hi,
> 
> If I have in /etc/passwd
> 
> splunk:x:101:101:Splunk User:/opt/splunkdashboards/var/lib/splunk:/sbin/
> nologin
> 
> and in splunkdashboards.fc:
> 
> /opt/splunkdashboards/var/lib(/.*)? gen_context(system_u:object_r:
> splunkdashboards_var_lib_t,s0)
> 
> then following label:
> 
> guest_u:object_r:usr_home_dir_t.
> 
> If in /etc/passwd
> 
> splunk:x:101:101:Splunk User:/nonexistant:/sbin/nologin
> 
> then label as expected.
> 
> I see Apache and Postfix have homedirs in various directories and are
> labelled correctly.
> 
> Please why?

genhomedircon generates user home directory contexts when you build/load
the policy. So after you change the user home dir in /etc/passwd, you
need to commit changes by running semodule -B, to build/load policy

> 
> Thank you.
> --
> selinux mailing list
> selinux at lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/selinux




More information about the selinux mailing list