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()
55 &usrdatum->exp_dfltlevel) < 0) { in user_to_record()
61 &usrdatum->exp_dfltlevel) < 0) { in user_to_record()
79 if (mls_range_cpy(&context.range, &usrdatum->exp_range) < 0) { in user_to_record()
121 user_datum_t *usrdatum = NULL; in sepol_user_modify() local
142 usrdatum = hashtab_search(policydb->p_users.table, cname); in sepol_user_modify()
145 if (usrdatum) { in sepol_user_modify()
147 int value_cp = usrdatum->s.value; in sepol_user_modify()
148 user_datum_destroy(usrdatum); in sepol_user_modify()
149 user_datum_init(usrdatum); in sepol_user_modify()
150 usrdatum->s.value = value_cp; in sepol_user_modify()
154 usrdatum = (user_datum_t *) malloc(sizeof(user_datum_t)); in sepol_user_modify()
155 if (!usrdatum) in sepol_user_modify()
157 user_datum_init(usrdatum); in sepol_user_modify()
176 (&(usrdatum->roles.roles), bit, 1)) in sepol_user_modify()
197 if (mls_level_cpy(&usrdatum->exp_dfltlevel, in sepol_user_modify()
217 if (mls_range_cpy(&usrdatum->exp_range, &context.range) < 0) { in sepol_user_modify()
256 usrdatum->s.value = ++policydb->p_users.nprim; in sepol_user_modify()
258 (hashtab_datum_t) usrdatum) < 0) in sepol_user_modify()
262 policydb->p_user_val_to_name[usrdatum->s.value - 1] = name; in sepol_user_modify()
263 policydb->user_val_to_struct[usrdatum->s.value - 1] = usrdatum; in sepol_user_modify()
267 if (role_set_expand(&usrdatum->roles, &usrdatum->cache, in sepol_user_modify()
285 if (new && usrdatum) { in sepol_user_modify()
286 role_set_destroy(&usrdatum->roles); in sepol_user_modify()
287 free(usrdatum); in sepol_user_modify()
323 user_datum_t *usrdatum = NULL; in sepol_user_query() local
328 usrdatum = hashtab_search(policydb->p_users.table, cname); in sepol_user_query()
330 if (!usrdatum) { in sepol_user_query()
335 if (user_to_record(handle, policydb, usrdatum->s.value - 1, response) < in sepol_user_query()