aboutsummaryrefslogtreecommitdiffstats
path: root/security/tomoyo/gc.c
diff options
context:
space:
mode:
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>2011-07-08 00:23:44 -0400
committerJames Morris <jmorris@namei.org>2011-07-10 21:05:33 -0400
commit2ca9bf453bdd478bcb6c01aa2d0bd4c2f4350563 (patch)
treeb9f6051059a2a90547a4501bf296b0cf3c9dbc76 /security/tomoyo/gc.c
parent8761afd49ebff8ae04c1a7888af090177441d07d (diff)
TOMOYO: Allow using executable's realpath and symlink's target as conditions.
This patch adds support for permission checks using executable file's realpath upon execve() and symlink's target upon symlink(). Hooks are in the last patch of this pathset. 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/gc.c')
-rw-r--r--security/tomoyo/gc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/security/tomoyo/gc.c b/security/tomoyo/gc.c
index 21fccd67c255..e0502b6d5866 100644
--- a/security/tomoyo/gc.c
+++ b/security/tomoyo/gc.c
@@ -357,13 +357,18 @@ void tomoyo_del_condition(struct list_head *element)
357 head.list); 357 head.list);
358 const u16 condc = cond->condc; 358 const u16 condc = cond->condc;
359 const u16 numbers_count = cond->numbers_count; 359 const u16 numbers_count = cond->numbers_count;
360 const u16 names_count = cond->names_count;
360 unsigned int i; 361 unsigned int i;
361 const struct tomoyo_condition_element *condp 362 const struct tomoyo_condition_element *condp
362 = (const struct tomoyo_condition_element *) (cond + 1); 363 = (const struct tomoyo_condition_element *) (cond + 1);
363 struct tomoyo_number_union *numbers_p 364 struct tomoyo_number_union *numbers_p
364 = (struct tomoyo_number_union *) (condp + condc); 365 = (struct tomoyo_number_union *) (condp + condc);
366 struct tomoyo_name_union *names_p
367 = (struct tomoyo_name_union *) (numbers_p + numbers_count);
365 for (i = 0; i < numbers_count; i++) 368 for (i = 0; i < numbers_count; i++)
366 tomoyo_put_number_union(numbers_p++); 369 tomoyo_put_number_union(numbers_p++);
370 for (i = 0; i < names_count; i++)
371 tomoyo_put_name_union(names_p++);
367} 372}
368 373
369/** 374/**