aboutsummaryrefslogtreecommitdiffstats
path: root/security/tomoyo/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/tomoyo/common.c')
-rw-r--r--security/tomoyo/common.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/security/tomoyo/common.c b/security/tomoyo/common.c
index 4f9047e94bd1..c8439cf2a448 100644
--- a/security/tomoyo/common.c
+++ b/security/tomoyo/common.c
@@ -1,9 +1,7 @@
1/* 1/*
2 * security/tomoyo/common.c 2 * security/tomoyo/common.c
3 * 3 *
4 * Common functions for TOMOYO. 4 * Copyright (C) 2005-2011 NTT DATA CORPORATION
5 *
6 * Copyright (C) 2005-2010 NTT DATA CORPORATION
7 */ 5 */
8 6
9#include <linux/uaccess.h> 7#include <linux/uaccess.h>
@@ -775,6 +773,14 @@ static void tomoyo_read_profile(struct tomoyo_io_buffer *head)
775 goto next; 773 goto next;
776} 774}
777 775
776/**
777 * tomoyo_same_manager - Check for duplicated "struct tomoyo_manager" entry.
778 *
779 * @a: Pointer to "struct tomoyo_acl_head".
780 * @b: Pointer to "struct tomoyo_acl_head".
781 *
782 * Returns true if @a == @b, false otherwise.
783 */
778static bool tomoyo_same_manager(const struct tomoyo_acl_head *a, 784static bool tomoyo_same_manager(const struct tomoyo_acl_head *a,
779 const struct tomoyo_acl_head *b) 785 const struct tomoyo_acl_head *b)
780{ 786{
@@ -1516,6 +1522,7 @@ static void tomoyo_read_pid(struct tomoyo_io_buffer *head)
1516 tomoyo_set_string(head, domain->domainname->name); 1522 tomoyo_set_string(head, domain->domainname->name);
1517} 1523}
1518 1524
1525/* String table for domain transition control keywords. */
1519static const char *tomoyo_transition_type[TOMOYO_MAX_TRANSITION_TYPE] = { 1526static const char *tomoyo_transition_type[TOMOYO_MAX_TRANSITION_TYPE] = {
1520 [TOMOYO_TRANSITION_CONTROL_NO_RESET] = "no_reset_domain ", 1527 [TOMOYO_TRANSITION_CONTROL_NO_RESET] = "no_reset_domain ",
1521 [TOMOYO_TRANSITION_CONTROL_RESET] = "reset_domain ", 1528 [TOMOYO_TRANSITION_CONTROL_RESET] = "reset_domain ",
@@ -1525,6 +1532,7 @@ static const char *tomoyo_transition_type[TOMOYO_MAX_TRANSITION_TYPE] = {
1525 [TOMOYO_TRANSITION_CONTROL_KEEP] = "keep_domain ", 1532 [TOMOYO_TRANSITION_CONTROL_KEEP] = "keep_domain ",
1526}; 1533};
1527 1534
1535/* String table for grouping keywords. */
1528static const char *tomoyo_group_name[TOMOYO_MAX_GROUP] = { 1536static const char *tomoyo_group_name[TOMOYO_MAX_GROUP] = {
1529 [TOMOYO_PATH_GROUP] = "path_group ", 1537 [TOMOYO_PATH_GROUP] = "path_group ",
1530 [TOMOYO_NUMBER_GROUP] = "number_group ", 1538 [TOMOYO_NUMBER_GROUP] = "number_group ",