Lines Matching refs:cur

70 		  struct avtab_node *prev, struct avtab_node *cur,  in avtab_insert_node()  argument
109 struct avtab_node *prev, *cur, *newnode; in avtab_insert() local
116 for (prev = NULL, cur = h->htable[hvalue]; in avtab_insert()
117 cur; in avtab_insert()
118 prev = cur, cur = cur->next) { in avtab_insert()
119 if (key->source_type == cur->key.source_type && in avtab_insert()
120 key->target_type == cur->key.target_type && in avtab_insert()
121 key->target_class == cur->key.target_class && in avtab_insert()
122 (specified & cur->key.specified)) { in avtab_insert()
128 if (key->source_type < cur->key.source_type) in avtab_insert()
130 if (key->source_type == cur->key.source_type && in avtab_insert()
131 key->target_type < cur->key.target_type) in avtab_insert()
133 if (key->source_type == cur->key.source_type && in avtab_insert()
134 key->target_type == cur->key.target_type && in avtab_insert()
135 key->target_class < cur->key.target_class) in avtab_insert()
139 newnode = avtab_insert_node(h, hvalue, prev, cur, key, datum); in avtab_insert()
154 struct avtab_node *prev, *cur; in avtab_insert_nonunique() local
160 for (prev = NULL, cur = h->htable[hvalue]; in avtab_insert_nonunique()
161 cur; in avtab_insert_nonunique()
162 prev = cur, cur = cur->next) { in avtab_insert_nonunique()
163 if (key->source_type == cur->key.source_type && in avtab_insert_nonunique()
164 key->target_type == cur->key.target_type && in avtab_insert_nonunique()
165 key->target_class == cur->key.target_class && in avtab_insert_nonunique()
166 (specified & cur->key.specified)) in avtab_insert_nonunique()
168 if (key->source_type < cur->key.source_type) in avtab_insert_nonunique()
170 if (key->source_type == cur->key.source_type && in avtab_insert_nonunique()
171 key->target_type < cur->key.target_type) in avtab_insert_nonunique()
173 if (key->source_type == cur->key.source_type && in avtab_insert_nonunique()
174 key->target_type == cur->key.target_type && in avtab_insert_nonunique()
175 key->target_class < cur->key.target_class) in avtab_insert_nonunique()
178 return avtab_insert_node(h, hvalue, prev, cur, key, datum); in avtab_insert_nonunique()
184 struct avtab_node *cur; in avtab_search() local
191 for (cur = h->htable[hvalue]; cur; in avtab_search()
192 cur = cur->next) { in avtab_search()
193 if (key->source_type == cur->key.source_type && in avtab_search()
194 key->target_type == cur->key.target_type && in avtab_search()
195 key->target_class == cur->key.target_class && in avtab_search()
196 (specified & cur->key.specified)) in avtab_search()
197 return &cur->datum; in avtab_search()
199 if (key->source_type < cur->key.source_type) in avtab_search()
201 if (key->source_type == cur->key.source_type && in avtab_search()
202 key->target_type < cur->key.target_type) in avtab_search()
204 if (key->source_type == cur->key.source_type && in avtab_search()
205 key->target_type == cur->key.target_type && in avtab_search()
206 key->target_class < cur->key.target_class) in avtab_search()
220 struct avtab_node *cur; in avtab_search_node() local
227 for (cur = h->htable[hvalue]; cur; in avtab_search_node()
228 cur = cur->next) { in avtab_search_node()
229 if (key->source_type == cur->key.source_type && in avtab_search_node()
230 key->target_type == cur->key.target_type && in avtab_search_node()
231 key->target_class == cur->key.target_class && in avtab_search_node()
232 (specified & cur->key.specified)) in avtab_search_node()
233 return cur; in avtab_search_node()
235 if (key->source_type < cur->key.source_type) in avtab_search_node()
237 if (key->source_type == cur->key.source_type && in avtab_search_node()
238 key->target_type < cur->key.target_type) in avtab_search_node()
240 if (key->source_type == cur->key.source_type && in avtab_search_node()
241 key->target_type == cur->key.target_type && in avtab_search_node()
242 key->target_class < cur->key.target_class) in avtab_search_node()
251 struct avtab_node *cur; in avtab_search_node_next() local
257 for (cur = node->next; cur; cur = cur->next) { in avtab_search_node_next()
258 if (node->key.source_type == cur->key.source_type && in avtab_search_node_next()
259 node->key.target_type == cur->key.target_type && in avtab_search_node_next()
260 node->key.target_class == cur->key.target_class && in avtab_search_node_next()
261 (specified & cur->key.specified)) in avtab_search_node_next()
262 return cur; in avtab_search_node_next()
264 if (node->key.source_type < cur->key.source_type) in avtab_search_node_next()
266 if (node->key.source_type == cur->key.source_type && in avtab_search_node_next()
267 node->key.target_type < cur->key.target_type) in avtab_search_node_next()
269 if (node->key.source_type == cur->key.source_type && in avtab_search_node_next()
270 node->key.target_type == cur->key.target_type && in avtab_search_node_next()
271 node->key.target_class < cur->key.target_class) in avtab_search_node_next()
280 struct avtab_node *cur, *temp; in avtab_destroy() local
286 cur = h->htable[i]; in avtab_destroy()
287 while (cur) { in avtab_destroy()
288 temp = cur; in avtab_destroy()
289 cur = cur->next; in avtab_destroy()
394 struct avtab_node *cur; in avtab_hash_eval() local
400 cur = h->htable[i]; in avtab_hash_eval()
401 if (cur) { in avtab_hash_eval()
404 while (cur) { in avtab_hash_eval()
406 cur = cur->next; in avtab_hash_eval()
645 int avtab_write_item(struct policydb *p, struct avtab_node *cur, void *fp) in avtab_write_item() argument
648 __le32 buf32[ARRAY_SIZE(cur->datum.u.xperms->perms.p)]; in avtab_write_item()
652 buf16[0] = cpu_to_le16(cur->key.source_type); in avtab_write_item()
653 buf16[1] = cpu_to_le16(cur->key.target_type); in avtab_write_item()
654 buf16[2] = cpu_to_le16(cur->key.target_class); in avtab_write_item()
655 buf16[3] = cpu_to_le16(cur->key.specified); in avtab_write_item()
660 if (cur->key.specified & AVTAB_XPERMS) { in avtab_write_item()
661 rc = put_entry(&cur->datum.u.xperms->specified, sizeof(u8), 1, fp); in avtab_write_item()
664 rc = put_entry(&cur->datum.u.xperms->driver, sizeof(u8), 1, fp); in avtab_write_item()
667 for (i = 0; i < ARRAY_SIZE(cur->datum.u.xperms->perms.p); i++) in avtab_write_item()
668 buf32[i] = cpu_to_le32(cur->datum.u.xperms->perms.p[i]); in avtab_write_item()
670 ARRAY_SIZE(cur->datum.u.xperms->perms.p), fp); in avtab_write_item()
672 buf32[0] = cpu_to_le32(cur->datum.u.data); in avtab_write_item()
684 struct avtab_node *cur; in avtab_write() local
693 for (cur = a->htable[i]; cur; in avtab_write()
694 cur = cur->next) { in avtab_write()
695 rc = avtab_write_item(p, cur, fp); in avtab_write()