Lines Matching defs:role

764  * Initialize the role table by implicitly adding role 'object_r'.  If
772 role_datum_t *role;
774 role = calloc(1, sizeof(role_datum_t));
775 if (!role) {
784 rc = symtab_insert(p, SYM_ROLES, key, role,
787 &role->s.value);
790 if (role->s.value != OBJECT_R_VAL) {
800 free(role);
944 role_datum_t *role;
946 role = (role_datum_t *) datum;
949 ebitmap_destroy(&role->cache);
950 if (type_set_expand(&role->types, &role->cache, p, 1)) {
1000 * of a class, role, or user are needed.
1039 role_datum_t *role;
1041 role = (role_datum_t *) datum;
1043 if (!value_isvalid(role->s.value, p->p_roles.nprim))
1045 if (p->p_role_val_to_name[role->s.value - 1] != NULL)
1047 p->p_role_val_to_name[role->s.value - 1] = (char *)key;
1048 p->role_val_to_struct[role->s.value - 1] = role;
1711 /* Further confine that a role attribute can't have the same
1712 * name as another regular role, and a role attribute can't
2030 c->role = le32_to_cpu(buf[1]);
2355 role_datum_t *role;
2360 role = calloc(1, sizeof(role_datum_t));
2361 if (!role)
2375 role->s.value = le32_to_cpu(buf[1]);
2377 role->bounds = le32_to_cpu(buf[2]);
2387 if (ebitmap_read(&role->dominates, fp))
2391 if (ebitmap_read(&role->types.types, fp))
2394 if (type_set_read(&role->types, fp))
2404 role->flavor = le32_to_cpu(buf[0]);
2406 if (ebitmap_read(&role->roles, fp))
2411 if (role->s.value != OBJECT_R_VAL) {
2412 ERR(fp->handle, "role %s has wrong value %d",
2413 OBJECT_R, role->s.value);
2414 role_destroy(key, role, NULL);
2417 role_destroy(key, role, NULL);
2421 if (hashtab_insert(h, key, role))
2427 role_destroy(key, role, NULL);
2552 tr->role = le32_to_cpu(buf[0]);
2592 ra->role = le32_to_cpu(buf[0]);