Home
last modified time | relevance | path

Searched refs:num_roles (Results 1 – 10 of 10) sorted by relevance

/third_party/selinux/libsepol/src/
Duser_record.c22 unsigned int num_roles; member
168 return user->num_roles; in sepol_user_get_num_roles()
186 sizeof(char *) * (user->num_roles + 1)); in sepol_user_add_role()
190 user->num_roles++; in sepol_user_add_role()
192 user->roles[user->num_roles - 1] = role_cp; in sepol_user_add_role()
209 for (i = 0; i < user->num_roles; i++) in sepol_user_has_role()
218 const char **roles_arr, unsigned int num_roles) in sepol_user_set_roles() argument
224 if (num_roles > 0) { in sepol_user_set_roles()
227 tmp_roles = (char **)calloc(1, sizeof(char *) * num_roles); in sepol_user_set_roles()
231 for (i = 0; i < num_roles; i++) { in sepol_user_set_roles()
[all …]
Dusers.c116 unsigned int num_roles = 0; in sepol_user_modify() local
136 if (sepol_user_get_roles(handle, user, &roles, &num_roles) < 0) in sepol_user_modify()
160 for (i = 0; i < num_roles; i++) { in sepol_user_modify()
Dmodule_to_cil.c1485 unsigned int num_roles = 0; in role_allows_to_cil() local
1493 rc = process_roleset(pdb, rs, attr_list, &roles, &num_roles); in role_allows_to_cil()
1504 for (i = 0; i < num_roles; i++) { in role_allows_to_cil()
1510 names_destroy(&roles, &num_roles); in role_allows_to_cil()
1517 names_destroy(&roles, &num_roles); in role_allows_to_cil()
Dkernel_to_cil.c2377 unsigned i, j, num, num_roles; in write_user_decl_rules_to_cil() local
2436 num_roles = strs_num_items(role_strs); in write_user_decl_rules_to_cil()
2437 for (j=0; j<num_roles; j++) { in write_user_decl_rules_to_cil()
/third_party/selinux/libsepol/tests/
Dtest-expander-users.c32 …oid check_user_roles(policydb_t * p, const char *user_name, const char **role_names, int num_roles) in check_user_roles() argument
47 found = calloc(num_roles, sizeof(unsigned char)); in check_user_roles()
51 for (j = 0; j < num_roles; j++) { in check_user_roles()
59 for (j = 0; j < num_roles; j++) { in check_user_roles()
/third_party/selinux/libsepol/include/sepol/
Duser_record.h65 unsigned int *num_roles);
69 const char **roles_arr, unsigned int num_roles);
/third_party/selinux/libsepol/cil/src/
Dcil_policy.c1588 int num_roles; in cil_users_to_policy() local
1592 num_roles = 0; in cil_users_to_policy()
1597 if (num_roles == 0) { in cil_users_to_policy()
1601 num_roles++; in cil_users_to_policy()
1604 if (num_roles > 0) { in cil_users_to_policy()
1606 if (num_roles > 1) { in cil_users_to_policy()
1613 if (num_roles > 1) { in cil_users_to_policy()
Dcil_post.c611 role->value = db->num_roles; in __cil_post_db_count_helper()
612 db->num_roles++; in __cil_post_db_count_helper()
699 db->val_to_role = cil_malloc(sizeof(*db->val_to_role) * db->num_roles); in __cil_post_db_array_helper()
979 rc = __cil_expr_list_to_bitmap(attr->expr_list, attr->roles, db->num_roles, db); in __evaluate_role_expression()
Dcil_internal.h316 int num_roles; member
Dcil.c436 (*db)->num_roles = 0; in cil_db_init()