diff options
Diffstat (limited to 'security/tomoyo/number_group.c')
-rw-r--r-- | security/tomoyo/number_group.c | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/security/tomoyo/number_group.c b/security/tomoyo/number_group.c index 99694153b947..5e75f5314bda 100644 --- a/security/tomoyo/number_group.c +++ b/security/tomoyo/number_group.c | |||
@@ -97,47 +97,6 @@ int tomoyo_write_number_group_policy(char *data, const bool is_delete) | |||
97 | } | 97 | } |
98 | 98 | ||
99 | /** | 99 | /** |
100 | * tomoyo_read_number_group_policy - Read "struct tomoyo_number_group" list. | ||
101 | * | ||
102 | * @head: Pointer to "struct tomoyo_io_buffer". | ||
103 | * | ||
104 | * Returns true on success, false otherwise. | ||
105 | * | ||
106 | * Caller holds tomoyo_read_lock(). | ||
107 | */ | ||
108 | bool tomoyo_read_number_group_policy(struct tomoyo_io_buffer *head) | ||
109 | { | ||
110 | struct list_head *gpos; | ||
111 | struct list_head *mpos; | ||
112 | list_for_each_cookie(gpos, head->read_var1, | ||
113 | &tomoyo_group_list[TOMOYO_NUMBER_GROUP]) { | ||
114 | struct tomoyo_group *group; | ||
115 | const char *name; | ||
116 | group = list_entry(gpos, struct tomoyo_group, list); | ||
117 | name = group->group_name->name; | ||
118 | list_for_each_cookie(mpos, head->read_var2, | ||
119 | &group->member_list) { | ||
120 | int pos; | ||
121 | const struct tomoyo_number_group *member | ||
122 | = list_entry(mpos, | ||
123 | struct tomoyo_number_group, | ||
124 | head.list); | ||
125 | if (member->head.is_deleted) | ||
126 | continue; | ||
127 | pos = head->read_avail; | ||
128 | if (!tomoyo_io_printf(head, TOMOYO_KEYWORD_NUMBER_GROUP | ||
129 | "%s", name) || | ||
130 | !tomoyo_print_number_union(head, &member->number) || | ||
131 | !tomoyo_io_printf(head, "\n")) { | ||
132 | head->read_avail = pos; | ||
133 | return false; | ||
134 | } | ||
135 | } | ||
136 | } | ||
137 | return true; | ||
138 | } | ||
139 | |||
140 | /** | ||
141 | * tomoyo_number_matches_group - Check whether the given number matches members of the given number group. | 100 | * tomoyo_number_matches_group - Check whether the given number matches members of the given number group. |
142 | * | 101 | * |
143 | * @min: Min number. | 102 | * @min: Min number. |