aboutsummaryrefslogtreecommitdiffstats
path: root/security/tomoyo/path_group.c
diff options
context:
space:
mode:
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>2010-06-15 09:22:42 +0900
committerJames Morris <jmorris@namei.org>2010-08-02 15:34:28 +1000
commit82e0f001a4c1112dcff9cafa9812a33889ad9b8a (patch)
tree55c7e99f8773129b602f837f0c79f8d542021195 /security/tomoyo/path_group.c
parent237ab459f12cb98eadd3fe7b85343e183a1076a4 (diff)
downloadmrst-s0i3-test-82e0f001a4c1112dcff9cafa9812a33889ad9b8a.tar.gz
mrst-s0i3-test-82e0f001a4c1112dcff9cafa9812a33889ad9b8a.tar.xz
mrst-s0i3-test-82e0f001a4c1112dcff9cafa9812a33889ad9b8a.zip
TOMOYO: Use common structure for list element.
Use common "struct list_head" + "bool" structure. 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.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/security/tomoyo/path_group.c b/security/tomoyo/path_group.c
index 07e4f782367..7838f768129 100644
--- a/security/tomoyo/path_group.c
+++ b/security/tomoyo/path_group.c
@@ -79,10 +79,10 @@ int tomoyo_write_path_group_policy(char *data, const bool is_delete)
goto out;
if (mutex_lock_interruptible(&tomoyo_policy_lock))
goto out;
- list_for_each_entry_rcu(member, &group->member_list, list) {
+ list_for_each_entry_rcu(member, &group->member_list, head.list) {
if (member->member_name != e.member_name)
continue;
- member->is_deleted = is_delete;
+ member->head.is_deleted = is_delete;
error = 0;
break;
}
@@ -90,7 +90,8 @@ int tomoyo_write_path_group_policy(char *data, const bool is_delete)
struct tomoyo_path_group_member *entry =
tomoyo_commit_ok(&e, sizeof(e));
if (entry) {
- list_add_tail_rcu(&entry->list, &group->member_list);
+ list_add_tail_rcu(&entry->head.list,
+ &group->member_list);
error = 0;
}
}
@@ -122,8 +123,8 @@ bool tomoyo_read_path_group_policy(struct tomoyo_io_buffer *head)
struct tomoyo_path_group_member *member;
member = list_entry(mpos,
struct tomoyo_path_group_member,
- list);
- if (member->is_deleted)
+ head.list);
+ if (member->head.is_deleted)
continue;
if (!tomoyo_io_printf(head, TOMOYO_KEYWORD_PATH_GROUP
"%s %s\n",
@@ -150,8 +151,8 @@ bool tomoyo_path_matches_group(const struct tomoyo_path_info *pathname,
{
struct tomoyo_path_group_member *member;
bool matched = false;
- list_for_each_entry_rcu(member, &group->member_list, list) {
- if (member->is_deleted)
+ list_for_each_entry_rcu(member, &group->member_list, head.list) {
+ if (member->head.is_deleted)
continue;
if (!tomoyo_path_matches_pattern(pathname,
member->member_name))