selinux: add selinuxfs structure for object class discovery

The structure is as follows (relative to selinuxfs root):

/class/file/index
/class/file/perms/read
/class/file/perms/write
...

Each class is allocated 33 inodes, 1 for the class index and 32 for
permissions.  Relative to SEL_CLASS_INO_OFFSET, the inode of the index file
DIV 33 is the class number.  The inode of the permission file % 33 is the
index of the permission for that class.

Signed-off-by: Christopher J. PeBenito <cpebenito@tresys.com>
Signed-off-by: James Morris <jmorris@namei.org>
This commit is contained in:
Christopher J. PeBenito
2007-05-23 09:12:09 -04:00
committed by James Morris
parent 0dd4ae516e
commit e47c8fc582
2 changed files with 250 additions and 0 deletions

View File

@@ -41,6 +41,7 @@ extern int selinux_mls_enabled;
int security_load_policy(void * data, size_t len);
#define SEL_VEC_MAX 32
struct av_decision {
u32 allowed;
u32 decided;