SELinux: Use dentry name in new object labeling
authorEric Paris <eparis@redhat.com>
Tue, 1 Feb 2011 16:05:40 +0000 (11:05 -0500)
committerEric Paris <eparis@redhat.com>
Tue, 1 Feb 2011 16:12:30 +0000 (11:12 -0500)
commit652bb9b0d6ce007f37c098947b2cc0c45efa3f66
tree7bf76f04a1fcaa401761a9a734b94682e2ac8b8c
parent2a7dba391e5628ad665ce84ef9a6648da541ebab
SELinux: Use dentry name in new object labeling

Currently SELinux has rules which label new objects according to 3 criteria.
The label of the process creating the object, the label of the parent
directory, and the type of object (reg, dir, char, block, etc.)  This patch
adds a 4th criteria, the dentry name, thus we can distinguish between
creating a file in an etc_t directory called shadow and one called motd.

There is no file globbing, regex parsing, or anything mystical.  Either the
policy exactly (strcmp) matches the dentry name of the object or it doesn't.
This patch has no changes from today if policy does not implement the new
rules.

Signed-off-by: Eric Paris <eparis@redhat.com>
security/selinux/hooks.c
security/selinux/include/security.h
security/selinux/ss/avtab.h
security/selinux/ss/policydb.c
security/selinux/ss/policydb.h
security/selinux/ss/services.c