Skip to contentSkip to conversation

File Context problem

DISCUSSION Daniel J Walsh 2 participants 2 messages Aug 6, 2007 SELinux security module

lore
Share & tools
lore
#0 lore raw

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=251001

As this bugzilla points out, we are somewhat inconsistant on the handling of file context. Currently we treat homedirs differently then we do file_context generated by a policy module. So the sort order seems to go

semanage fcontext -a : Highest genhomedircon : Second
semodule -i : third

So the question is should the context of genhomedircon and semodule -i be treated the same.

/etc/selinux/TYPE/context/files/file_contexts /etc/selinux/TYPE/context/files/file_contexts.homedirs

I think local should override everything else.

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#1 lore raw
Quoted 7 lines · Daniel J Walsh

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=251001

As this bugzilla points out, we are somewhat inconsistant on the handling of file context. Currently we treat homedirs differently then we do file_context generated by a policy module. So the sort order seems to go

semanage fcontext -a : Highest
genhomedircon : Second
semodule -i : third

That ordering is applied by libselinux matchpathcon (now the label_file back-end).

The bug report isn't quite right; if they had specified a pathname with no regex characters (i.e. escaped the "." as "\."), then it would have taken precedence over any regex expression. libselinux moves exact pathname specs to the end to give them precedence over any regex expression.

Quoted 6 lines

So the question is should the context of genhomedircon and semodule -i be treated the same.

/etc/selinux/TYPE/context/files/file_contexts /etc/selinux/TYPE/context/files/file_contexts.homedirs

I think local should override everything else.

Signature · 8 lines
Stephen Smalley
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.