]> git.baikalelectronics.ru Git - kernel.git/commit
SELinux: check open perms in dentry_open not inode_permission
authorEric Paris <eparis@redhat.com>
Wed, 29 Oct 2008 21:06:46 +0000 (17:06 -0400)
committerJames Morris <jmorris@namei.org>
Thu, 30 Oct 2008 15:00:52 +0000 (02:00 +1100)
commita5dc2b299c7ab97ec12b134446d928d91fff3f55
tree26ff1dddb3c8727118b24819e83b4b7c500ff595
parent4f5bc7eb883242b2761c4f63fa36822126a550bc
SELinux: check open perms in dentry_open not inode_permission

Some operations, like searching a directory path or connecting a unix domain
socket, make explicit calls into inode_permission.  Our choices are to
either try to come up with a signature for all of the explicit calls to
inode_permission and do not check open on those, or to move the open checks to
dentry_open where we know this is always an open operation.  This patch moves
the checks to dentry_open.

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: James Morris <jmorris@namei.org>
security/selinux/hooks.c