Lines Matching refs:role
121 * Initialize the role table.
127 struct role_datum *role;
129 role = kzalloc(sizeof(*role), GFP_KERNEL);
130 if (!role) {
134 role->value = ++p->p_roles.nprim;
135 if (role->value != OBJECT_R_VAL) {
145 rc = hashtab_insert(p->p_roles.table, key, role);
154 kfree(role);
204 * of a class, role, or user are needed.
237 struct role_datum *role;
239 role = datum;
241 if (!role->value || role->value > p->p_roles.nprim)
243 p->p_role_val_to_name[role->value - 1] = key;
244 p->role_val_to_struct[role->value - 1] = role;
516 struct role_datum *role;
519 role = datum;
520 ebitmap_destroy(&role->dominates);
521 ebitmap_destroy(&role->types);
716 struct role_datum *role;
719 if (!c->role || c->role > p->p_roles.nprim)
728 if (c->role != OBJECT_R_VAL) {
732 role = p->role_val_to_struct[c->role - 1];
733 if (!ebitmap_get_bit(&role->types,
735 /* role may not be associated with type */
739 * User must be authorized for the role.
746 c->role - 1))
747 /* user may not be associated with role */
834 c->role = le32_to_cpu(buf[1]);
1134 struct role_datum *role;
1139 role = kzalloc(sizeof(*role), GFP_KERNEL);
1140 if (!role) {
1150 role->value = le32_to_cpu(buf[1]);
1162 rc = ebitmap_read(&role->dominates, fp);
1166 rc = ebitmap_read(&role->types, fp);
1171 if (role->value != OBJECT_R_VAL) {
1173 OBJECT_R, role->value);
1181 rc = hashtab_insert(h, key, role);
1187 role_destroy(key, role, NULL);
1587 tr->role = le32_to_cpu(buf[0]);
1612 ra->role = le32_to_cpu(buf[0]);