diff options
Diffstat (limited to 'security/tomoyo/condition.c')
-rw-r--r-- | security/tomoyo/condition.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/security/tomoyo/condition.c b/security/tomoyo/condition.c index 8a05f71eaf67..3a05eb3e2a64 100644 --- a/security/tomoyo/condition.c +++ b/security/tomoyo/condition.c | |||
@@ -348,6 +348,7 @@ static inline bool tomoyo_same_condition(const struct tomoyo_condition *a, | |||
348 | a->numbers_count == b->numbers_count && | 348 | a->numbers_count == b->numbers_count && |
349 | a->names_count == b->names_count && | 349 | a->names_count == b->names_count && |
350 | a->argc == b->argc && a->envc == b->envc && | 350 | a->argc == b->argc && a->envc == b->envc && |
351 | a->grant_log == b->grant_log && | ||
351 | !memcmp(a + 1, b + 1, a->size - sizeof(*a)); | 352 | !memcmp(a + 1, b + 1, a->size - sizeof(*a)); |
352 | } | 353 | } |
353 | 354 | ||
@@ -486,6 +487,20 @@ rerun: | |||
486 | goto out; | 487 | goto out; |
487 | dprintk(KERN_WARNING "%u: <%s>%s=<%s>\n", __LINE__, left_word, | 488 | dprintk(KERN_WARNING "%u: <%s>%s=<%s>\n", __LINE__, left_word, |
488 | is_not ? "!" : "", right_word); | 489 | is_not ? "!" : "", right_word); |
490 | if (!strcmp(left_word, "grant_log")) { | ||
491 | if (entry) { | ||
492 | if (is_not || | ||
493 | entry->grant_log != TOMOYO_GRANTLOG_AUTO) | ||
494 | goto out; | ||
495 | else if (!strcmp(right_word, "yes")) | ||
496 | entry->grant_log = TOMOYO_GRANTLOG_YES; | ||
497 | else if (!strcmp(right_word, "no")) | ||
498 | entry->grant_log = TOMOYO_GRANTLOG_NO; | ||
499 | else | ||
500 | goto out; | ||
501 | } | ||
502 | continue; | ||
503 | } | ||
489 | if (!strncmp(left_word, "exec.argv[", 10)) { | 504 | if (!strncmp(left_word, "exec.argv[", 10)) { |
490 | if (!argv) { | 505 | if (!argv) { |
491 | e.argc++; | 506 | e.argc++; |