/security/apparmor/ |
D | policy_unpack.c | 93 const char *info, struct aa_ext *e, int error) in audit_iface() argument 100 if (e) in audit_iface() 101 aad.iface.pos = e->pos - e->start; in audit_iface() 112 static bool inbounds(struct aa_ext *e, size_t size) in inbounds() argument 114 return (size <= e->end - e->pos); in inbounds() 124 static size_t unpack_u16_chunk(struct aa_ext *e, char **chunk) in unpack_u16_chunk() argument 128 if (!inbounds(e, sizeof(u16))) in unpack_u16_chunk() 130 size = le16_to_cpu(get_unaligned((u16 *) e->pos)); in unpack_u16_chunk() 131 e->pos += sizeof(u16); in unpack_u16_chunk() 132 if (!inbounds(e, size)) in unpack_u16_chunk() [all …]
|
/security/selinux/ss/ |
D | ebitmap.h | 44 #define ebitmap_length(e) ((e)->highbit) argument 46 static inline unsigned int ebitmap_start_positive(struct ebitmap *e, in ebitmap_start_positive() argument 51 for (*n = e->node; *n; *n = (*n)->next) { in ebitmap_start_positive() 56 return ebitmap_length(e); in ebitmap_start_positive() 59 static inline void ebitmap_init(struct ebitmap *e) in ebitmap_init() argument 61 memset(e, 0, sizeof(*e)); in ebitmap_init() 64 static inline unsigned int ebitmap_next_positive(struct ebitmap *e, in ebitmap_next_positive() argument 79 return ebitmap_length(e); in ebitmap_next_positive() 119 #define ebitmap_for_each_positive_bit(e, n, bit) \ argument 120 for (bit = ebitmap_start_positive(e, &n); \ [all …]
|
D | ebitmap.c | 233 int ebitmap_get_bit(struct ebitmap *e, unsigned long bit) in ebitmap_get_bit() argument 237 if (e->highbit < bit) in ebitmap_get_bit() 240 n = e->node; in ebitmap_get_bit() 250 int ebitmap_set_bit(struct ebitmap *e, unsigned long bit, int value) in ebitmap_set_bit() argument 255 n = e->node; in ebitmap_set_bit() 276 e->highbit = prev->startbit in ebitmap_set_bit() 279 e->highbit = 0; in ebitmap_set_bit() 284 e->node = n->next; in ebitmap_set_bit() 305 e->highbit = new->startbit + EBITMAP_SIZE; in ebitmap_set_bit() 311 new->next = e->node; in ebitmap_set_bit() [all …]
|
D | policydb.c | 643 struct constraint_expr *e, *etmp; in cls_destroy() local 652 e = constraint->expr; in cls_destroy() 653 while (e) { in cls_destroy() 654 etmp = e; in cls_destroy() 655 e = e->next; in cls_destroy() 665 e = constraint->expr; in cls_destroy() 666 while (e) { in cls_destroy() 667 etmp = e; in cls_destroy() 668 e = e->next; in cls_destroy() 866 struct ebitmap *e; in policydb_destroy() local [all …]
|
D | mls.c | 39 struct ebitmap *e; in mls_compute_context_len() local 53 e = &context->range.level[l].cat; in mls_compute_context_len() 54 ebitmap_for_each_positive_bit(e, node, i) { in mls_compute_context_len() 93 struct ebitmap *e; in mls_sid_to_context() local 112 e = &context->range.level[l].cat; in mls_sid_to_context() 113 ebitmap_for_each_positive_bit(e, node, i) { in mls_sid_to_context()
|
D | services.c | 281 struct constraint_expr *e; in constraint_expr_eval() local 285 for (e = cexpr; e; e = e->next) { in constraint_expr_eval() 286 switch (e->expr_type) { in constraint_expr_eval() 304 switch (e->attr) { in constraint_expr_eval() 318 switch (e->op) { in constraint_expr_eval() 362 switch (e->op) { in constraint_expr_eval() 388 switch (e->op) { in constraint_expr_eval() 404 if (e->attr & CEXPR_TARGET) in constraint_expr_eval() 406 else if (e->attr & CEXPR_XTARGET) { in constraint_expr_eval() 413 if (e->attr & CEXPR_USER) in constraint_expr_eval() [all …]
|
/security/tomoyo/ |
D | group.c | 79 struct tomoyo_path_group e = { }; in tomoyo_write_group() local 80 e.member_name = tomoyo_get_name(tomoyo_read_token(param)); in tomoyo_write_group() 81 if (!e.member_name) { in tomoyo_write_group() 85 error = tomoyo_update_policy(&e.head, sizeof(e), param, in tomoyo_write_group() 87 tomoyo_put_name(e.member_name); in tomoyo_write_group() 89 struct tomoyo_number_group e = { }; in tomoyo_write_group() local 91 !tomoyo_parse_number_union(param, &e.number)) in tomoyo_write_group() 93 error = tomoyo_update_policy(&e.head, sizeof(e), param, in tomoyo_write_group() 100 struct tomoyo_address_group e = { }; in tomoyo_write_group() local 103 !tomoyo_parse_ipaddr_union(param, &e.address)) in tomoyo_write_group() [all …]
|
D | condition.c | 440 struct tomoyo_condition *e) in tomoyo_get_transit_preference() argument 445 e->transit = tomoyo_get_domainname(param); in tomoyo_get_transit_preference() 460 e->transit = tomoyo_get_name(tomoyo_read_token(param)); in tomoyo_get_transit_preference() 462 if (e->transit) in tomoyo_get_transit_preference() 486 struct tomoyo_condition e = { }; in tomoyo_get_condition() local 488 tomoyo_get_transit_preference(param, &e); in tomoyo_get_condition() 547 e.argc++; in tomoyo_get_condition() 548 e.condc++; in tomoyo_get_condition() 550 e.argc--; in tomoyo_get_condition() 551 e.condc--; in tomoyo_get_condition() [all …]
|
D | file.c | 381 struct tomoyo_path_acl e = { in tomoyo_update_path_acl() local 386 if (!tomoyo_parse_name_union(param, &e.name)) in tomoyo_update_path_acl() 389 error = tomoyo_update_domain(&e.head, sizeof(e), param, in tomoyo_update_path_acl() 392 tomoyo_put_name_union(&e.name); in tomoyo_update_path_acl() 454 struct tomoyo_mkdev_acl e = { in tomoyo_update_mkdev_acl() local 459 if (!tomoyo_parse_name_union(param, &e.name) || in tomoyo_update_mkdev_acl() 460 !tomoyo_parse_number_union(param, &e.mode) || in tomoyo_update_mkdev_acl() 461 !tomoyo_parse_number_union(param, &e.major) || in tomoyo_update_mkdev_acl() 462 !tomoyo_parse_number_union(param, &e.minor)) in tomoyo_update_mkdev_acl() 465 error = tomoyo_update_domain(&e.head, sizeof(e), param, in tomoyo_update_mkdev_acl() [all …]
|
D | network.c | 283 struct tomoyo_inet_acl e = { .head.type = TOMOYO_TYPE_INET_ACL }; in tomoyo_write_inet_network() local 289 for (e.protocol = 0; e.protocol < TOMOYO_SOCK_MAX; e.protocol++) in tomoyo_write_inet_network() 290 if (!strcmp(protocol, tomoyo_proto_keyword[e.protocol])) in tomoyo_write_inet_network() 294 e.perm |= 1 << type; in tomoyo_write_inet_network() 295 if (e.protocol == TOMOYO_SOCK_MAX || !e.perm) in tomoyo_write_inet_network() 299 e.address.group = in tomoyo_write_inet_network() 301 if (!e.address.group) in tomoyo_write_inet_network() 304 if (!tomoyo_parse_ipaddr_union(param, &e.address)) in tomoyo_write_inet_network() 307 if (!tomoyo_parse_number_union(param, &e.port) || in tomoyo_write_inet_network() 308 e.port.values[1] > 65535) in tomoyo_write_inet_network() [all …]
|
D | domain.c | 236 struct tomoyo_transition_control e = { .type = type }; in tomoyo_write_transition_control() local 251 e.program = tomoyo_get_name(program); in tomoyo_write_transition_control() 252 if (!e.program) in tomoyo_write_transition_control() 259 e.is_last_name = true; in tomoyo_write_transition_control() 261 e.domainname = tomoyo_get_name(domainname); in tomoyo_write_transition_control() 262 if (!e.domainname) in tomoyo_write_transition_control() 266 error = tomoyo_update_policy(&e.head, sizeof(e), param, in tomoyo_write_transition_control() 269 tomoyo_put_name(e.domainname); in tomoyo_write_transition_control() 270 tomoyo_put_name(e.program); in tomoyo_write_transition_control() 390 struct tomoyo_aggregator e = { }; in tomoyo_write_aggregator() local [all …]
|
D | environ.c | 95 struct tomoyo_env_acl e = { .head.type = TOMOYO_TYPE_ENV_ACL }; in tomoyo_write_env() local 101 e.env = tomoyo_get_name(data); in tomoyo_write_env() 102 if (!e.env) in tomoyo_write_env() 104 error = tomoyo_update_domain(&e.head, sizeof(e), param, in tomoyo_write_env() 106 tomoyo_put_name(e.env); in tomoyo_write_env()
|
D | memory.c | 95 struct tomoyo_group e = { }; in tomoyo_get_group() local 102 e.group_name = tomoyo_get_name(group_name); in tomoyo_get_group() 103 if (!e.group_name) in tomoyo_get_group() 109 if (e.group_name != group->group_name || in tomoyo_get_group() 117 struct tomoyo_group *entry = tomoyo_commit_ok(&e, sizeof(e)); in tomoyo_get_group() 128 tomoyo_put_name(e.group_name); in tomoyo_get_group()
|
D | util.c | 449 unsigned char e; in tomoyo_correct_word2() local 491 e = *string++; in tomoyo_correct_word2() 492 if (d < '0' || d > '7' || e < '0' || e > '7') in tomoyo_correct_word2() 494 c = tomoyo_make_byte(c, d, e); in tomoyo_correct_word2()
|
D | common.c | 845 struct tomoyo_manager e = { }; in tomoyo_update_manager_entry() local 856 e.manager = tomoyo_get_name(manager); in tomoyo_update_manager_entry() 857 if (e.manager) { in tomoyo_update_manager_entry() 858 error = tomoyo_update_policy(&e.head, sizeof(e), ¶m, in tomoyo_update_manager_entry() 860 tomoyo_put_name(e.manager); in tomoyo_update_manager_entry() 1042 struct tomoyo_task_acl e = { in tomoyo_write_task() local 1046 if (e.domainname) in tomoyo_write_task() 1047 error = tomoyo_update_domain(&e.head, sizeof(e), param, in tomoyo_write_task() 1050 tomoyo_put_name(e.domainname); in tomoyo_write_task()
|
D | Kconfig | 50 variant part of policy and verifying (e.g. running GPG check) and
|
/security/integrity/ima/ |
D | ima_fs.c | 120 struct ima_template_entry *e; in ima_measurements_show() local 127 e = qe->entry; in ima_measurements_show() 128 if (e == NULL) in ima_measurements_show() 139 ima_putc(m, e->digest, TPM_DIGEST_SIZE); in ima_measurements_show() 142 namelen = strlen(e->template_desc->name); in ima_measurements_show() 146 ima_putc(m, e->template_desc->name, namelen); in ima_measurements_show() 149 if (strcmp(e->template_desc->name, IMA_TEMPLATE_IMA_NAME) == 0) in ima_measurements_show() 153 ima_putc(m, &e->template_data_len, in ima_measurements_show() 154 sizeof(e->template_data_len)); in ima_measurements_show() 157 for (i = 0; i < e->template_desc->num_fields; i++) { in ima_measurements_show() [all …]
|
/security/selinux/ |
D | Kconfig | 49 support runtime disabling of SELinux, e.g. from /sbin/init, for
|