diff options
author | Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> | 2010-06-17 03:53:24 -0400 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2010-08-02 01:34:40 -0400 |
commit | a230f9e7121cbcbfe23bd5a630abf6b53cece555 (patch) | |
tree | a81820f41d57ffd8704aaef4331f696030d7ba77 /security/tomoyo/common.h | |
parent | a98aa4debe2728abb3353e35fc5d110dcc0d7f0d (diff) |
TOMOYO: Use array of "struct list_head".
Assign list id and make the lists as array of "struct list_head".
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.h | 38 |
1 files changed, 27 insertions, 11 deletions
diff --git a/security/tomoyo/common.h b/security/tomoyo/common.h index 9f289e412a63..451dc3c1036a 100644 --- a/security/tomoyo/common.h +++ b/security/tomoyo/common.h | |||
@@ -46,6 +46,30 @@ enum tomoyo_mode_index { | |||
46 | TOMOYO_CONFIG_USE_DEFAULT = 255 | 46 | TOMOYO_CONFIG_USE_DEFAULT = 255 |
47 | }; | 47 | }; |
48 | 48 | ||
49 | enum tomoyo_policy_id { | ||
50 | TOMOYO_ID_GROUP, | ||
51 | TOMOYO_ID_PATH_GROUP, | ||
52 | TOMOYO_ID_NUMBER_GROUP, | ||
53 | TOMOYO_ID_DOMAIN_INITIALIZER, | ||
54 | TOMOYO_ID_DOMAIN_KEEPER, | ||
55 | TOMOYO_ID_AGGREGATOR, | ||
56 | TOMOYO_ID_ALIAS, | ||
57 | TOMOYO_ID_GLOBALLY_READABLE, | ||
58 | TOMOYO_ID_PATTERN, | ||
59 | TOMOYO_ID_NO_REWRITE, | ||
60 | TOMOYO_ID_MANAGER, | ||
61 | TOMOYO_ID_NAME, | ||
62 | TOMOYO_ID_ACL, | ||
63 | TOMOYO_ID_DOMAIN, | ||
64 | TOMOYO_MAX_POLICY | ||
65 | }; | ||
66 | |||
67 | enum tomoyo_group_id { | ||
68 | TOMOYO_PATH_GROUP, | ||
69 | TOMOYO_NUMBER_GROUP, | ||
70 | TOMOYO_MAX_GROUP | ||
71 | }; | ||
72 | |||
49 | /* Keywords for ACLs. */ | 73 | /* Keywords for ACLs. */ |
50 | #define TOMOYO_KEYWORD_AGGREGATOR "aggregator " | 74 | #define TOMOYO_KEYWORD_AGGREGATOR "aggregator " |
51 | #define TOMOYO_KEYWORD_ALIAS "alias " | 75 | #define TOMOYO_KEYWORD_ALIAS "alias " |
@@ -570,7 +594,7 @@ struct tomoyo_globally_readable_file_entry { | |||
570 | 594 | ||
571 | /* | 595 | /* |
572 | * tomoyo_pattern_entry is a structure which is used for holding | 596 | * tomoyo_pattern_entry is a structure which is used for holding |
573 | * "tomoyo_pattern_list" entries. | 597 | * "file_pattern" entries. |
574 | * It has following fields. | 598 | * It has following fields. |
575 | * | 599 | * |
576 | * (1) "head" is "struct tomoyo_acl_head". | 600 | * (1) "head" is "struct tomoyo_acl_head". |
@@ -950,16 +974,8 @@ extern struct srcu_struct tomoyo_ss; | |||
950 | /* The list for "struct tomoyo_domain_info". */ | 974 | /* The list for "struct tomoyo_domain_info". */ |
951 | extern struct list_head tomoyo_domain_list; | 975 | extern struct list_head tomoyo_domain_list; |
952 | 976 | ||
953 | extern struct list_head tomoyo_path_group_list; | 977 | extern struct list_head tomoyo_policy_list[TOMOYO_MAX_POLICY]; |
954 | extern struct list_head tomoyo_number_group_list; | 978 | extern struct list_head tomoyo_group_list[TOMOYO_MAX_GROUP]; |
955 | extern struct list_head tomoyo_domain_initializer_list; | ||
956 | extern struct list_head tomoyo_domain_keeper_list; | ||
957 | extern struct list_head tomoyo_aggregator_list; | ||
958 | extern struct list_head tomoyo_alias_list; | ||
959 | extern struct list_head tomoyo_globally_readable_list; | ||
960 | extern struct list_head tomoyo_pattern_list; | ||
961 | extern struct list_head tomoyo_no_rewrite_list; | ||
962 | extern struct list_head tomoyo_policy_manager_list; | ||
963 | extern struct list_head tomoyo_name_list[TOMOYO_MAX_HASH]; | 979 | extern struct list_head tomoyo_name_list[TOMOYO_MAX_HASH]; |
964 | 980 | ||
965 | /* Lock for protecting policy. */ | 981 | /* Lock for protecting policy. */ |