aboutsummaryrefslogtreecommitdiffstats
path: root/security/tomoyo/audit.c
diff options
context:
space:
mode:
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>2011-06-26 10:21:19 -0400
committerJames Morris <jmorris@namei.org>2011-06-28 19:31:21 -0400
commit2c47ab9353242b0f061959318f83c55360b88fa4 (patch)
tree03693079bf04572d30ef0ca37f717ae8acc29863 /security/tomoyo/audit.c
parent2e503bbb435ae418aebbe4aeede1c6f2a33d6f74 (diff)
TOMOYO: Cleanup part 4.
Gather string constants to one file in order to make the object size smaller. Use unsigned type where appropriate. read()/write() returns ssize_t. 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/audit.c')
-rw-r--r--security/tomoyo/audit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/security/tomoyo/audit.c b/security/tomoyo/audit.c
index ef2172f29583..45e0a9f3c384 100644
--- a/security/tomoyo/audit.c
+++ b/security/tomoyo/audit.c
@@ -163,7 +163,8 @@ static bool tomoyo_get_audit(const struct tomoyo_policy_namespace *ns,
163 const bool is_granted) 163 const bool is_granted)
164{ 164{
165 u8 mode; 165 u8 mode;
166 const u8 category = TOMOYO_MAC_CATEGORY_FILE + TOMOYO_MAX_MAC_INDEX; 166 const u8 category = tomoyo_index2category[index] +
167 TOMOYO_MAX_MAC_INDEX;
167 struct tomoyo_profile *p; 168 struct tomoyo_profile *p;
168 if (!tomoyo_policy_loaded) 169 if (!tomoyo_policy_loaded)
169 return false; 170 return false;