summaryrefslogtreecommitdiffstats
path: root/security/tomoyo/common.h
diff options
context:
space:
mode:
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>2011-06-26 23:18:21 +0900
committerJames Morris <jmorris@namei.org>2011-06-29 09:31:20 +1000
commitd5ca1725ac9ba876c2dd614bb9826d0c4e13d818 (patch)
treefbff7fe1e39597c5bac981f63a2be659f4ec84e7 /security/tomoyo/common.h
parent0d2171d711cbfca84cc0001121be8a6cc8e4d148 (diff)
downloadlinux-d5ca1725ac9ba876c2dd614bb9826d0c4e13d818.tar.gz
linux-d5ca1725ac9ba876c2dd614bb9826d0c4e13d818.tar.bz2
linux-d5ca1725ac9ba876c2dd614bb9826d0c4e13d818.zip
TOMOYO: Simplify profile structure.
Remove global preference from profile structure in order to make code simpler. Due to this structure change, printk() warnings upon policy violation are temporarily disabled. They will be replaced by /sys/kernel/security/tomoyo/audit by next patch. Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/tomoyo/common.h')
-rw-r--r--security/tomoyo/common.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/security/tomoyo/common.h b/security/tomoyo/common.h
index 139ad7544460..2b39e63234c8 100644
--- a/security/tomoyo/common.h
+++ b/security/tomoyo/common.h
@@ -211,6 +211,12 @@ enum tomoyo_mac_category_index {
*/
#define TOMOYO_RETRY_REQUEST 1
+/* Index numbers for profile's PREFERENCE values. */
+enum tomoyo_pref_index {
+ TOMOYO_PREF_MAX_LEARNING_ENTRY,
+ TOMOYO_MAX_PREF
+};
+
/********** Structure definitions. **********/
/* Common header for holding ACL entries. */
@@ -497,6 +503,7 @@ struct tomoyo_profile {
struct tomoyo_preference preference;
u8 default_config;
u8 config[TOMOYO_MAX_MAC_INDEX + TOMOYO_MAX_MAC_CATEGORY_INDEX];
+ unsigned int pref[TOMOYO_MAX_PREF];
};
/********** Function prototypes. **********/