Lines Matching full:sid

3  * Implementation of the SID table type.
33 #define sid_to_index(sid) ((sid) - (SECINITSID_NUM + 1)) argument
63 u32 sid = 0; in context_to_sid() local
70 sid = entry->sid; in context_to_sid()
75 return sid; in context_to_sid()
78 int sidtab_set_initial(struct sidtab *s, u32 sid, struct context *context) in sidtab_set_initial() argument
84 if (sid == 0 || sid > SECINITSID_NUM) in sidtab_set_initial()
87 isid = &s->isids[sid - 1]; in sidtab_set_initial()
107 isid->entry.sid = sid; in sidtab_set_initial()
236 static struct sidtab_entry *sidtab_lookup_initial(struct sidtab *s, u32 sid) in sidtab_lookup_initial() argument
238 return s->isids[sid - 1].set ? &s->isids[sid - 1].entry : NULL; in sidtab_lookup_initial()
241 static struct sidtab_entry *sidtab_search_core(struct sidtab *s, u32 sid, in sidtab_search_core() argument
244 if (sid != 0) { in sidtab_search_core()
247 if (sid > SECINITSID_NUM) in sidtab_search_core()
248 entry = sidtab_lookup(s, sid_to_index(sid)); in sidtab_search_core()
250 entry = sidtab_lookup_initial(s, sid); in sidtab_search_core()
258 struct sidtab_entry *sidtab_search_entry(struct sidtab *s, u32 sid) in sidtab_search_entry() argument
260 return sidtab_search_core(s, sid, 0); in sidtab_search_entry()
263 struct sidtab_entry *sidtab_search_entry_force(struct sidtab *s, u32 sid) in sidtab_search_entry_force() argument
265 return sidtab_search_core(s, sid, 1); in sidtab_search_entry_force()
268 int sidtab_context_to_sid(struct sidtab *s, struct context *context, u32 *sid) in sidtab_context_to_sid() argument
276 *sid = context_to_sid(s, context, hash); in sidtab_context_to_sid()
277 if (*sid) in sidtab_context_to_sid()
284 *sid = context_to_sid(s, context, hash); in sidtab_context_to_sid()
285 if (*sid) in sidtab_context_to_sid()
310 dst->sid = index_to_sid(count); in sidtab_context_to_sid()
339 dst_convert->sid = index_to_sid(count); in sidtab_context_to_sid()
351 *sid = index_to_sid(count); in sidtab_context_to_sid()
370 entry->sid = index_to_sid(i); in sidtab_convert_hashtable()
461 pr_info("SELinux: Converting %u SID table entries...\n", count); in sidtab_convert()