diff options
author | Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> | 2010-06-17 03:54:33 -0400 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2010-08-02 01:34:41 -0400 |
commit | 31845e8c6d3f4f26702e567c667277f9fd1f73a3 (patch) | |
tree | 5c457513fcdae4e7e39b19d36e1698ae298ce8d4 /security/tomoyo/path_group.c | |
parent | a230f9e7121cbcbfe23bd5a630abf6b53cece555 (diff) |
TOMOYO: Aggregate reader functions.
Now lists are accessible via array index. Aggregate reader functions using index.
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/path_group.c')
-rw-r--r-- | security/tomoyo/path_group.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/security/tomoyo/path_group.c b/security/tomoyo/path_group.c index 44e8a5b1ca67..2f9f9240bf5a 100644 --- a/security/tomoyo/path_group.c +++ b/security/tomoyo/path_group.c | |||
@@ -95,41 +95,6 @@ int tomoyo_write_path_group_policy(char *data, const bool is_delete) | |||
95 | } | 95 | } |
96 | 96 | ||
97 | /** | 97 | /** |
98 | * tomoyo_read_path_group_policy - Read "struct tomoyo_path_group" list. | ||
99 | * | ||
100 | * @head: Pointer to "struct tomoyo_io_buffer". | ||
101 | * | ||
102 | * Returns true on success, false otherwise. | ||
103 | * | ||
104 | * Caller holds tomoyo_read_lock(). | ||
105 | */ | ||
106 | bool tomoyo_read_path_group_policy(struct tomoyo_io_buffer *head) | ||
107 | { | ||
108 | struct list_head *gpos; | ||
109 | struct list_head *mpos; | ||
110 | list_for_each_cookie(gpos, head->read_var1, | ||
111 | &tomoyo_group_list[TOMOYO_PATH_GROUP]) { | ||
112 | struct tomoyo_group *group; | ||
113 | group = list_entry(gpos, struct tomoyo_group, list); | ||
114 | list_for_each_cookie(mpos, head->read_var2, | ||
115 | &group->member_list) { | ||
116 | struct tomoyo_path_group *member; | ||
117 | member = list_entry(mpos, | ||
118 | struct tomoyo_path_group, | ||
119 | head.list); | ||
120 | if (member->head.is_deleted) | ||
121 | continue; | ||
122 | if (!tomoyo_io_printf(head, TOMOYO_KEYWORD_PATH_GROUP | ||
123 | "%s %s\n", | ||
124 | group->group_name->name, | ||
125 | member->member_name->name)) | ||
126 | return false; | ||
127 | } | ||
128 | } | ||
129 | return true; | ||
130 | } | ||
131 | |||
132 | /** | ||
133 | * tomoyo_path_matches_group - Check whether the given pathname matches members of the given pathname group. | 98 | * tomoyo_path_matches_group - Check whether the given pathname matches members of the given pathname group. |
134 | * | 99 | * |
135 | * @pathname: The name of pathname. | 100 | * @pathname: The name of pathname. |