summaryrefslogtreecommitdiff
path: root/security/selinux/ss/policydb.h
diff options
context:
space:
mode:
authorJames Morris <jmorris@namei.org>2011-05-24 23:20:19 +1000
committerJames Morris <jmorris@namei.org>2011-05-24 23:20:19 +1000
commitb7b57551bbda1390959207f79f2038aa7adb72ae (patch)
treed591a08e7e45615b51d8b5ee1634a29920f62c3f /security/selinux/ss/policydb.h
parent434d42cfd05a7cc452457a81d2029540cba12150 (diff)
parent7a627e3b9a2bd0f06945bbe64bcf403e788ecf6e (diff)
downloadlinux-3.10-b7b57551bbda1390959207f79f2038aa7adb72ae.tar.gz
linux-3.10-b7b57551bbda1390959207f79f2038aa7adb72ae.tar.bz2
linux-3.10-b7b57551bbda1390959207f79f2038aa7adb72ae.zip
Merge branch 'master' of git://git.infradead.org/users/eparis/selinux into for-linus
Conflicts: lib/flex_array.c security/selinux/avc.c security/selinux/hooks.c security/selinux/ss/policydb.c security/smack/smack_lsm.c Manually resolve conflicts. Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/selinux/ss/policydb.h')
-rw-r--r--security/selinux/ss/policydb.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/security/selinux/ss/policydb.h b/security/selinux/ss/policydb.h
index 732ea4a6868..b846c038718 100644
--- a/security/selinux/ss/policydb.h
+++ b/security/selinux/ss/policydb.h
@@ -72,17 +72,20 @@ struct role_datum {
struct role_trans {
u32 role; /* current role */
- u32 type; /* program executable type */
+ u32 type; /* program executable type, or new object type */
+ u32 tclass; /* process class, or new object class */
u32 new_role; /* new role */
struct role_trans *next;
};
struct filename_trans {
- struct filename_trans *next;
u32 stype; /* current process */
u32 ttype; /* parent dir context */
u16 tclass; /* class of new object */
const char *name; /* last path component */
+};
+
+struct filename_trans_datum {
u32 otype; /* expected of new object */
};
@@ -227,7 +230,10 @@ struct policydb {
struct role_trans *role_tr;
/* file transitions with the last path component */
- struct filename_trans *filename_trans;
+ /* quickly exclude lookups when parent ttype has no rules */
+ struct ebitmap filename_trans_ttypes;
+ /* actual set of filename_trans rules */
+ struct hashtab *filename_trans;
/* bools indexed by (value - 1) */
struct cond_bool_datum **bool_val_to_struct;