Lines Matching refs:usrdatum
21 user_datum_t *usrdatum = policydb->user_val_to_struct[user_idx]; in user_to_record() local
28 if (!usrdatum) in user_to_record()
31 roles = &(usrdatum->roles.roles); in user_to_record()
53 &usrdatum->exp_dfltlevel) < 0) { in user_to_record()
59 &usrdatum->exp_dfltlevel) < 0) { in user_to_record()
77 if (mls_range_cpy(&context.range, &usrdatum->exp_range) < 0) { in user_to_record()
119 user_datum_t *usrdatum = NULL; in sepol_user_modify() local
140 usrdatum = hashtab_search(policydb->p_users.table, cname); in sepol_user_modify()
143 if (usrdatum) { in sepol_user_modify()
145 int value_cp = usrdatum->s.value; in sepol_user_modify()
146 user_datum_destroy(usrdatum); in sepol_user_modify()
147 user_datum_init(usrdatum); in sepol_user_modify()
148 usrdatum->s.value = value_cp; in sepol_user_modify()
152 usrdatum = (user_datum_t *) malloc(sizeof(user_datum_t)); in sepol_user_modify()
153 if (!usrdatum) in sepol_user_modify()
155 user_datum_init(usrdatum); in sepol_user_modify()
172 if (ebitmap_set_bit(&(usrdatum->roles.roles), bit, 1)) in sepol_user_modify()
192 if (mls_level_cpy(&usrdatum->exp_dfltlevel, in sepol_user_modify()
212 if (mls_range_cpy(&usrdatum->exp_range, &context.range) < 0) { in sepol_user_modify()
251 usrdatum->s.value = ++policydb->p_users.nprim; in sepol_user_modify()
253 (hashtab_datum_t) usrdatum) < 0) in sepol_user_modify()
257 policydb->p_user_val_to_name[usrdatum->s.value - 1] = name; in sepol_user_modify()
258 policydb->user_val_to_struct[usrdatum->s.value - 1] = usrdatum; in sepol_user_modify()
262 if (role_set_expand(&usrdatum->roles, &usrdatum->cache, in sepol_user_modify()
280 if (new && usrdatum) { in sepol_user_modify()
281 role_set_destroy(&usrdatum->roles); in sepol_user_modify()
282 free(usrdatum); in sepol_user_modify()
318 user_datum_t *usrdatum = NULL; in sepol_user_query() local
323 usrdatum = hashtab_search(policydb->p_users.table, cname); in sepol_user_query()
325 if (!usrdatum) { in sepol_user_query()
330 if (user_to_record(handle, policydb, usrdatum->s.value - 1, response) < in sepol_user_query()