Smack: check permissions from user space (v2)
authorJarkko Sakkinen <jarkko.sakkinen@intel.com>
Thu, 8 Sep 2011 07:12:01 +0000 (10:12 +0300)
committerCasey Schaufler <cschaufler@cschaufler-intel.(none)>
Wed, 12 Oct 2011 21:21:32 +0000 (14:21 -0700)
commit828716c28fe4aa232ea280ea8ed6fb103eefb6ac
treef75377cf3e770a9a67feb64fb8bef867735a975b
parent545a7260343bbaf11c7f1a4b8c3d9660bb9266e5
Smack: check permissions from user space (v2)

Adds a new file into SmackFS called 'access'. Wanted
Smack permission is written into /smack/access.
After that result can be read from the opened file.
If access applies result contains 1 and otherwise
0. File access is protected from race conditions
by using simple_transaction_get()/set() API.

Fixes from the previous version:
- Removed smack.h changes, refactoring left-over
from previous version.
- Removed #include <linux/smack.h>, refactoring
left-over from previous version.

Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@intel.com>
Signed-off-by: Casey Schaufler <cschaufler@cschaufler-intel.(none)>
security/smack/smackfs.c