Lines Matching refs:sid
31 #define sid_to_index(sid) (sid - (SECINITSID_NUM + 1)) argument
61 u32 sid = 0; in context_to_sid() local
68 sid = entry->sid; in context_to_sid()
73 return sid; in context_to_sid()
76 int sidtab_set_initial(struct sidtab *s, u32 sid, struct context *context) in sidtab_set_initial() argument
82 if (sid == 0 || sid > SECINITSID_NUM) in sidtab_set_initial()
85 isid = &s->isids[sid - 1]; in sidtab_set_initial()
105 isid->entry.sid = sid; in sidtab_set_initial()
232 static struct sidtab_entry *sidtab_lookup_initial(struct sidtab *s, u32 sid) in sidtab_lookup_initial() argument
234 return s->isids[sid - 1].set ? &s->isids[sid - 1].entry : NULL; in sidtab_lookup_initial()
237 static struct sidtab_entry *sidtab_search_core(struct sidtab *s, u32 sid, in sidtab_search_core() argument
240 if (sid != 0) { in sidtab_search_core()
243 if (sid > SECINITSID_NUM) in sidtab_search_core()
244 entry = sidtab_lookup(s, sid_to_index(sid)); in sidtab_search_core()
246 entry = sidtab_lookup_initial(s, sid); in sidtab_search_core()
254 struct sidtab_entry *sidtab_search_entry(struct sidtab *s, u32 sid) in sidtab_search_entry() argument
256 return sidtab_search_core(s, sid, 0); in sidtab_search_entry()
259 struct sidtab_entry *sidtab_search_entry_force(struct sidtab *s, u32 sid) in sidtab_search_entry_force() argument
261 return sidtab_search_core(s, sid, 1); in sidtab_search_entry_force()
265 u32 *sid) in sidtab_context_to_sid() argument
273 *sid = context_to_sid(s, context, hash); in sidtab_context_to_sid()
274 if (*sid) in sidtab_context_to_sid()
281 *sid = context_to_sid(s, context, hash); in sidtab_context_to_sid()
282 if (*sid) in sidtab_context_to_sid()
308 dst->sid = index_to_sid(count); in sidtab_context_to_sid()
333 dst_convert->sid = index_to_sid(count); in sidtab_context_to_sid()
345 *sid = index_to_sid(count); in sidtab_context_to_sid()
364 entry->sid = index_to_sid(i); in sidtab_convert_hashtable()