Home
last modified time | relevance | path

Searched refs:datum (Results 1 – 25 of 69) sorted by relevance

123

/external/selinux/libsepol/cil/src/
Dcil_symtab.c62 void cil_symtab_datum_init(struct cil_symtab_datum *datum) in cil_symtab_datum_init() argument
64 datum->name = NULL; in cil_symtab_datum_init()
65 datum->fqn = NULL; in cil_symtab_datum_init()
66 datum->symtab = NULL; in cil_symtab_datum_init()
67 cil_list_init(&datum->nodes, CIL_LIST_ITEM); in cil_symtab_datum_init()
70 void cil_symtab_datum_destroy(struct cil_symtab_datum *datum) in cil_symtab_datum_destroy() argument
72 cil_list_destroy(&datum->nodes, 0); in cil_symtab_datum_destroy()
73 cil_symtab_remove_datum(datum); in cil_symtab_datum_destroy()
76 void cil_symtab_datum_remove_node(struct cil_symtab_datum *datum, struct cil_tree_node *node) in cil_symtab_datum_remove_node() argument
78 if (datum && datum->nodes != NULL) { in cil_symtab_datum_remove_node()
[all …]
Dcil_copy_ast.c101 char *key = orig->datum.name; in cil_copy_block()
102 struct cil_symtab_datum *datum = NULL; in cil_copy_block() local
104 cil_symtab_get_datum(symtab, key, &datum); in cil_copy_block()
105 if (datum == NULL) { in cil_copy_block()
110 *copy = datum;; in cil_copy_block()
148 char *key = orig->datum.name; in cil_copy_policycap()
149 struct cil_symtab_datum *datum = NULL; in cil_copy_policycap() local
151 cil_symtab_get_datum(symtab, key, &datum); in cil_copy_policycap()
152 if (datum == NULL) { in cil_copy_policycap()
157 *copy = datum; in cil_copy_policycap()
[all …]
Dcil_fqn.c48 struct cil_symtab_datum *datum = (struct cil_symtab_datum *)d; in __cil_fqn_qualify_decls() local
57 newlen = fqn_args->len + strlen(datum->name); in __cil_fqn_qualify_decls()
59 cil_log(CIL_INFO, "Fully qualified name for %s is too long\n", datum->name); in __cil_fqn_qualify_decls()
64 strcat(prefix, datum->name); in __cil_fqn_qualify_decls()
65 datum->fqn = cil_strpool_add(prefix); in __cil_fqn_qualify_decls()
76 struct cil_symtab_datum *datum = (struct cil_symtab_datum *)block; in __cil_fqn_qualify_blocks() local
77 struct cil_tree_node *node = NODE(datum); in __cil_fqn_qualify_blocks()
85 int newlen = fqn_args->len + strlen(datum->name) + 1; in __cil_fqn_qualify_blocks()
87 cil_log(CIL_INFO, "Fully qualified name for block %s is too long\n", datum->name); in __cil_fqn_qualify_blocks()
95 strcat(child_args.prefix, datum->name); in __cil_fqn_qualify_blocks()
Dcil_symtab.h62 struct cil_complex_symtab_datum *datum; member
74 void cil_symtab_datum_init(struct cil_symtab_datum *datum);
75 void cil_symtab_datum_destroy(struct cil_symtab_datum *datum);
76 void cil_symtab_datum_remove_node(struct cil_symtab_datum *datum, struct cil_tree_node *node);
77 int cil_symtab_insert(symtab_t *symtab, hashtab_key_t key, struct cil_symtab_datum *datum, struct c…
78 void cil_symtab_remove_datum(struct cil_symtab_datum *datum);
79 int cil_symtab_get_datum(symtab_t *symtab, char *key, struct cil_symtab_datum **datum);
85 …mplex_symtab *symtab, struct cil_complex_symtab_key *ckey, struct cil_complex_symtab_datum *datum);
Dcil_tree.c139 struct cil_symtab_datum *datum; in cil_tree_node_destroy() local
146 datum = (*node)->data; in cil_tree_node_destroy()
147 cil_symtab_datum_remove_node(datum, *node); in cil_tree_node_destroy()
148 if (datum->nodes == NULL) { in cil_tree_node_destroy()
437 cil_log(CIL_INFO, " %s", ((struct cil_perm *)current_perm->data)->datum.name); in cil_tree_print_perms_list()
439 cil_log(CIL_INFO, " %s", ((struct cil_perm*)current_perm->data)->datum.name); in cil_tree_print_perms_list()
511 cil_log(CIL_INFO, " %s", level->sens->datum.name); in cil_tree_print_level()
546 cil_log(CIL_INFO, " %s", context->user->datum.name); in cil_tree_print_context()
552 cil_log(CIL_INFO, " %s", context->role->datum.name); in cil_tree_print_context()
592 cil_log(CIL_INFO, "BLOCK: %s\n", block->datum.name); in cil_tree_print_node()
[all …]
Dcil_verify.c317 int cil_verify_no_self_reference(struct cil_symtab_datum *datum, struct cil_list *datum_list) in cil_verify_no_self_reference() argument
324 if (d == datum) { in cil_verify_no_self_reference()
325 cil_log(CIL_ERR,"Self-reference found for %s\n",datum->name); in cil_verify_no_self_reference()
329 int rc = cil_verify_no_self_reference(datum, i->data); in cil_verify_no_self_reference()
379 …cil_log(CIL_ERR, "SID %s not in sidorder statement at line %d of %s\n", sid->datum.name, node->lin… in __cil_verify_ordered_node_helper()
385 …cil_log(CIL_ERR, "Class %s not in classorder statement at line %d of %s\n", class->datum.name, nod… in __cil_verify_ordered_node_helper()
391 …cil_log(CIL_ERR, "Category %s not in categoryorder statement at line %d of %s\n", cat->datum.name,… in __cil_verify_ordered_node_helper()
397 …nsitivity %s not in sensitivityorder statement at line %d of %s\n", sens->datum.name, node->line, … in __cil_verify_ordered_node_helper()
431 struct cil_tree_node *node = sid->datum.nodes->head->data; in __cil_verify_initsids()
432 …cil_log(CIL_ERR, "No context assigned to SID %s declared at line %d in %s\n",sid->datum.name, node… in __cil_verify_initsids()
[all …]
Dcil_internal.h308 struct cil_symtab_datum datum; member
329 struct cil_symtab_datum datum; member
334 struct cil_symtab_datum datum; member
340 struct cil_symtab_datum datum; member
364 struct cil_symtab_datum datum; member
385 struct cil_symtab_datum datum; member
395 struct cil_symtab_datum datum; member
411 struct cil_symtab_datum datum; member
452 struct cil_symtab_datum datum; member
459 struct cil_symtab_datum datum; member
[all …]
Dcil.c258 (*db)->selftype->datum.name = CIL_KEY_SELF; in cil_db_init()
259 (*db)->selftype->datum.fqn = CIL_KEY_SELF; in cil_db_init()
1145 …str_len += strlen("user ") + strlen(user->datum.fqn) + strlen(" prefix ") + strlen(userprefix->pre… in cil_userprefixes_to_string()
1157 buf_pos = snprintf(str_tmp, str_len, "user %s prefix %s;\n", user->datum.fqn, in cil_userprefixes_to_string()
1222 if (strcmp(low->sens->datum.fqn, high->sens->datum.fqn)) { in cil_level_equals()
1256 str_len += strlen(lvl->sens->datum.fqn); in __cil_level_strlen()
1263 str1 = cat->datum.fqn; in __cil_level_strlen()
1268 str2 = cat->datum.fqn; in __cil_level_strlen()
1271 str_len += strlen(str1) + strlen(cat->datum.fqn) + 1; in __cil_level_strlen()
1273 str_len += strlen(str1) + strlen(str2) + strlen(cat->datum.fqn) + 2; in __cil_level_strlen()
[all …]
Dcil_resolve_ast.c75 struct cil_symtab_datum *datum = NULL; in __cil_insert_name() local
80 cil_symtab_get_datum(symtab, key, &datum); in __cil_insert_name()
81 if (datum != NULL) { in __cil_insert_name()
82 return (struct cil_name *)datum; in __cil_insert_name()
150 struct cil_symtab_datum *datum = NULL; in cil_resolve_classperms() local
154 rc = cil_resolve_name(current, cp->class_str, CIL_SYM_CLASSES, extra_args, &datum); in cil_resolve_classperms()
159 class = (struct cil_class *)datum; in cil_resolve_classperms()
181 struct cil_symtab_datum *datum = NULL; in cil_resolve_classperms_set() local
183 rc = cil_resolve_name(current, cp_set->set_str, CIL_SYM_CLASSPERMSETS, extra_args, &datum); in cil_resolve_classperms_set()
187 cp_set->set = (struct cil_classpermission*)datum; in cil_resolve_classperms_set()
[all …]
Dcil_binary.c104 static int __cil_get_sepol_user_datum(policydb_t *pdb, struct cil_symtab_datum *datum, user_datum_t… in __cil_get_sepol_user_datum() argument
106 *sepol_user = hashtab_search(pdb->p_users.table, datum->fqn); in __cil_get_sepol_user_datum()
108 cil_log(CIL_INFO, "Failed to find user %s in sepol hashtab\n", datum->fqn); in __cil_get_sepol_user_datum()
115 static int __cil_get_sepol_role_datum(policydb_t *pdb, struct cil_symtab_datum *datum, role_datum_t… in __cil_get_sepol_role_datum() argument
117 *sepol_role = hashtab_search(pdb->p_roles.table, datum->fqn); in __cil_get_sepol_role_datum()
119 cil_log(CIL_INFO, "Failed to find role %s in sepol hashtab\n", datum->fqn); in __cil_get_sepol_role_datum()
126 static int __cil_get_sepol_type_datum(policydb_t *pdb, struct cil_symtab_datum *datum, type_datum_t… in __cil_get_sepol_type_datum() argument
128 *sepol_type = hashtab_search(pdb->p_types.table, datum->fqn); in __cil_get_sepol_type_datum()
130 cil_log(CIL_INFO, "Failed to find type %s in sepol hashtab\n", datum->fqn); in __cil_get_sepol_type_datum()
137 static int __cil_get_sepol_class_datum(policydb_t *pdb, struct cil_symtab_datum *datum, class_datum… in __cil_get_sepol_class_datum() argument
[all …]
/external/selinux/libsepol/tests/
Dtest-common.c57 static int common_test_index(hashtab_key_t key, hashtab_datum_t datum, void *data) in common_test_index() argument
59 common_datum_t *d = (common_datum_t *) datum; in common_test_index()
66 static int class_test_index(hashtab_key_t key, hashtab_datum_t datum, void *data) in class_test_index() argument
68 class_datum_t *d = (class_datum_t *) datum; in class_test_index()
76 static int role_test_index(hashtab_key_t key, hashtab_datum_t datum, void *data) in role_test_index() argument
78 role_datum_t *d = (role_datum_t *) datum; in role_test_index()
86 static int type_test_index(hashtab_key_t key, hashtab_datum_t datum, void *data) in type_test_index() argument
88 type_datum_t *d = (type_datum_t *) datum; in type_test_index()
100 static int user_test_index(hashtab_key_t key, hashtab_datum_t datum, void *data) in user_test_index() argument
102 user_datum_t *d = (user_datum_t *) datum; in user_test_index()
[all …]
/external/selinux/libsepol/src/
Dgenbools.c76 struct cond_bool_datum *datum; local
96 datum = hashtab_search(policydb->p_bools.table, name);
97 if (!datum) {
102 if (datum->state != val) {
103 datum->state = val;
126 datum =
129 if (!datum) {
134 if (datum->state != val) {
135 datum->state = val;
215 struct cond_bool_datum *datum; local
[all …]
Dhashtab.c66 int hashtab_insert(hashtab_t h, hashtab_key_t key, hashtab_datum_t datum) in hashtab_insert() argument
90 newnode->datum = datum; in hashtab_insert()
130 destroy(cur->key, cur->datum, args); in hashtab_remove()
136 int hashtab_replace(hashtab_t h, hashtab_key_t key, hashtab_datum_t datum, in hashtab_replace() argument
156 destroy(cur->key, cur->datum, args); in hashtab_replace()
158 cur->datum = datum; in hashtab_replace()
165 newnode->datum = datum; in hashtab_replace()
195 return cur->datum; in hashtab_search()
235 ret = apply(cur->key, cur->datum, args); in hashtab_map()
263 ret = apply(cur->key, cur->datum, args); in hashtab_map_remove_on_error()
[all …]
Davtab.c93 avtab_datum_t * datum) in avtab_insert_node() argument
110 if (datum->ops) /* else caller populates ops*/ in avtab_insert_node()
111 *ops = *(datum->ops); in avtab_insert_node()
113 newnode->datum.ops = ops; in avtab_insert_node()
115 newnode->datum = *datum; in avtab_insert_node()
130 int avtab_insert(avtab_t * h, avtab_key_t * key, avtab_datum_t * datum) in avtab_insert() argument
162 newnode = avtab_insert_node(h, hvalue, prev, key, datum); in avtab_insert()
174 avtab_insert_nonunique(avtab_t * h, avtab_key_t * key, avtab_datum_t * datum) in avtab_insert_nonunique() argument
201 newnode = avtab_insert_node(h, hvalue, prev, key, datum); in avtab_insert_nonunique()
222 return &cur->datum; in avtab_search()
[all …]
Dassertion.c43 node->datum.data & curperm->data)); in report_failure()
50 node->datum.data & curperm->data)); in report_failure()
57 node->datum.data & curperm->data)); in report_failure()
80 if (node->datum.data & curperm->data) { in check_assertion_helper()
88 if (node->datum.data & curperm->data) { in check_assertion_helper()
Dhierarchy.c61 prefix##_datum_t *datum, \
66 if (datum->bounds) \
67 *parent = a->p->prefix##_val_to_struct[datum->bounds - 1]; \
69 datum_name = a->p->p_##prefix##_val_to_name[datum->s.value - 1]; \
89 a->p->p_##prefix##_val_to_name[datum->s.value - 1]); \
294 avdat.data = (cur_av->node->datum.data in pullup_unconditional_perms()
302 avnode->datum.data |= avdat.data; in pullup_unconditional_perms()
353 avdat.data = cur_av->node->datum.data; in check_cond_avtab_hierarchy()
377 avdat.data = cur_av->node->datum.data; in check_cond_avtab_hierarchy()
Dlink.c123 static int permission_copy_callback(hashtab_key_t key, hashtab_datum_t datum, in permission_copy_callback() argument
136 perm = (perm_datum_t *) datum; in permission_copy_callback()
243 static int class_copy_callback(hashtab_key_t key, hashtab_datum_t datum, in class_copy_callback() argument
252 cladatum = (class_datum_t *) datum; in class_copy_callback()
346 static int role_copy_callback(hashtab_key_t key, hashtab_datum_t datum, in role_copy_callback() argument
354 role = (role_datum_t *) datum; in role_copy_callback()
436 static int type_copy_callback(hashtab_key_t key, hashtab_datum_t datum, in type_copy_callback() argument
444 type = (type_datum_t *) datum; in type_copy_callback()
531 static int user_copy_callback(hashtab_key_t key, hashtab_datum_t datum, in user_copy_callback() argument
539 user = (user_datum_t *) datum; in user_copy_callback()
[all …]
Dexpand.c74 static int type_copy_callback(hashtab_key_t key, hashtab_datum_t datum, in type_copy_callback() argument
83 type = (type_datum_t *) datum; in type_copy_callback()
144 static int attr_convert_callback(hashtab_key_t key, hashtab_datum_t datum, in attr_convert_callback() argument
153 type = (type_datum_t *) datum; in attr_convert_callback()
187 static int perm_copy_callback(hashtab_key_t key, hashtab_datum_t datum, in perm_copy_callback() argument
196 perm = (perm_datum_t *) datum; in perm_copy_callback()
224 static int common_copy_callback(hashtab_key_t key, hashtab_datum_t datum, in common_copy_callback() argument
233 common = (common_datum_t *) datum; in common_copy_callback()
410 static int class_copy_callback(hashtab_key_t key, hashtab_datum_t datum, in class_copy_callback() argument
419 class = (class_datum_t *) datum; in class_copy_callback()
[all …]
/external/selinux/policycoreutils/newrole/
Dhashtab.c45 int hashtab_insert(hashtab_t h, hashtab_key_t key, hashtab_datum_t datum) in hashtab_insert() argument
69 newnode->datum = datum; in hashtab_insert()
109 destroy(cur->key, cur->datum, args); in hashtab_remove()
115 int hashtab_replace(hashtab_t h, hashtab_key_t key, hashtab_datum_t datum, in hashtab_replace() argument
135 destroy(cur->key, cur->datum, args); in hashtab_replace()
137 cur->datum = datum; in hashtab_replace()
144 newnode->datum = datum; in hashtab_replace()
174 return cur->datum; in hashtab_search()
214 ret = apply(cur->key, cur->datum, args); in hashtab_map()
242 ret = apply(cur->key, cur->datum, args); in hashtab_map_remove_on_error()
[all …]
/external/sepolicy/tools/sepolicy-analyze/
Dtypecmp.c36 c->datum.data |= d->data; in insert_type_rule()
48 n->datum = *d; in insert_type_rule()
142 perms1 = l1->datum.data & ~c->datum.data; in find_match()
143 perms2 = c->datum.data & ~l1->datum.data; in find_match()
227 || l1->datum.data != l2->datum.data) in analyze_types()
244 display_allow(policydb, &l1->key, i, l1->datum.data); in analyze_types()
246 display_allow(policydb, &l2->key, j, l2->datum.data); in analyze_types()
/external/bison/lib/
Dobstack.h316 # define obstack_1grow(OBSTACK,datum) \ argument
321 obstack_1grow_fast (__o, datum); \
328 # define obstack_ptr_grow(OBSTACK,datum) \ argument
333 obstack_ptr_grow_fast (__o, datum); }) \
335 # define obstack_int_grow(OBSTACK,datum) \ argument
340 obstack_int_grow_fast (__o, datum); })
448 # define obstack_1grow(h,datum) \ argument
451 obstack_1grow_fast (h, datum))
453 # define obstack_ptr_grow(h,datum) \ argument
456 obstack_ptr_grow_fast (h, datum))
[all …]
/external/selinux/checkpolicy/
Dmodule_compiler.c128 hashtab_key_t key, hashtab_datum_t datum, in declare_symbol() argument
138 retval = symtab_insert(policydbp, symbol_type, key, datum, in declare_symbol()
623 hashtab_key_t key, hashtab_datum_t datum, in require_symbol() argument
633 retval = symtab_insert(policydbp, symbol_type, key, datum, in require_symbol()
656 ((type_datum_t *) datum)->flavor; in require_symbol()
723 static int perm_destroy(hashtab_key_t key, hashtab_datum_t datum, void *p in perm_destroy() argument
728 free(datum); in perm_destroy()
745 class_datum_t *datum = NULL; in require_class() local
762 if ((datum = calloc(1, sizeof(*datum))) == NULL || in require_class()
763 symtab_init(&datum->permissions, PERM_SYMTAB_SIZE)) { in require_class()
[all …]
/external/fonttools/Lib/fontTools/ttLib/tables/
DS_V_G_.py191 datum = struct.pack(">H",numEntries)
192 entryList.append(datum)
193 curOffset = len(datum) + doc_index_entry_format_0Size*numEntries
212 datum = struct.pack(">H", numColorParams)
213 dataList.append(datum)
215 datum = struct.pack(">H", uiNameId)
216 dataList.append(datum)
218 datum = struct.pack(">H", numColorPalettes)
219 dataList.append(datum)
221 datum = struct.pack(">H", colorPalette.uiNameID)
[all …]
/external/selinux/policycoreutils/sepolgen-ifgen/
Dsepolgen-ifgen-attr-helper.c41 static int perm_name(hashtab_key_t key, hashtab_datum_t datum, void *data) in perm_name() argument
46 perdatum = (perm_datum_t *) datum; in perm_name()
111 int output_avrule(avtab_key_t *key, avtab_datum_t *datum, void *args) in output_avrule() argument
122 render_access_mask(datum->data, key, cb_data->policy, cb_data->fp); in output_avrule()
128 static int attribute_callback(hashtab_key_t key, hashtab_datum_t datum, void *datap) in attribute_callback() argument
131 type_datum_t *t = (type_datum_t *)datum; in attribute_callback()
/external/selinux/checkpolicy/test/
Ddispol.c137 int render_av_rule(avtab_key_t * key, avtab_datum_t * datum, uint32_t what, in render_av_rule() argument
164 render_access_mask(datum->data, key, p, fp); in render_av_rule()
170 render_access_mask(datum->data, key, p, fp); in render_av_rule()
178 render_access_mask(~datum->data, key, p, fp); in render_av_rule()
185 render_type(datum->data, p, fp); in render_av_rule()
191 render_type(datum->data, p, fp); in render_av_rule()
197 render_type(datum->data, p, fp); in render_av_rule()
208 render_operations(datum->ops, key, fp); in render_av_rule()
225 render_av_rule(&cur->key, &cur->datum, what, p, fp); in display_avtab()
290 render_av_rule(&av_cur->node->key, &av_cur->node->datum, in display_cond_expressions()
[all …]

123