Lines Matching refs:scope
137 * current scope stack then this would return a 0.
147 /* Attempt to declare or require a symbol within the current scope.
156 uint32_t * dest_value, uint32_t scope)
165 ret = symtab_insert(policydbp, symbol_type, key, datum, scope,
208 if (ebitmap_set_bit(decl->declared.scope + symbol_type,
253 static int create_role(uint32_t scope, unsigned char isattr, role_datum_t **role, char **key)
279 if (scope == SCOPE_DECL) {
388 static int create_type(uint32_t scope, unsigned char isattr, type_datum_t **type)
419 if (scope == SCOPE_DECL) {
498 static int create_user(uint32_t scope, user_datum_t **user, char **key)
522 if (scope == SCOPE_DECL) {
615 * This function assumes that the ID is within scope. c.f.,
661 * This function assumes that the ID is within scope. c.f.,
708 /* Attempt to require a symbol within the current scope. If currently
727 if (ebitmap_set_bit(decl->required.scope + symbol_type,
739 scope_index_t *scope;
743 scope = &decl->required;
744 if (class_value > scope->class_perms_len) {
746 ebitmap_t *new_map = realloc(scope->class_perms_map,
751 scope->class_perms_map = new_map;
752 for (i = scope->class_perms_len; i < class_value; i++) {
753 ebitmap_init(scope->class_perms_map + i);
755 scope->class_perms_len = class_value;
757 if (ebitmap_set_bit(scope->class_perms_map + class_value - 1,
1116 static int is_scope_in_stack(const scope_datum_t * scope, const scope_stack_t * stack)
1120 return 0; /* no matching scope found */
1124 for (i = 0; i < scope->decl_ids_len; i++) {
1125 if (scope->decl_ids[i] == decl->decl_id) {
1134 /* not within scope of this stack, so try its parent */
1135 return is_scope_in_stack(scope, stack->parent);
1140 const scope_datum_t *scope =
1141 (scope_datum_t *) hashtab_search(policydbp->scope[symbol_type].
1143 if (scope == NULL) {
1146 return is_scope_in_stack(scope, stack_top);
1150 const scope_index_t * scope)
1152 if (class_value > scope->class_perms_len) {
1155 if (ebitmap_get_bit(scope->class_perms_map + class_value - 1,
1166 return 0; /* no matching scope found */
1181 /* not within scope of this stack, so try its parent */
1246 * scope stack */
1383 const ebitmap_t *src_bitmap = &src_scope->scope[i];
1384 ebitmap_t *dest_bitmap = &dest_scope->scope[i];
1451 /* Push a new scope on to the stack and update the 'last' pointer.