/security/selinux/ss/ |
D | policydb.c | 184 static int perm_destroy(void *key, void *datum, void *p) in perm_destroy() argument 191 static int common_destroy(void *key, void *datum, void *p) in common_destroy() argument 218 static int cls_destroy(void *key, void *datum, void *p) in cls_destroy() argument 260 static int role_destroy(void *key, void *datum, void *p) in role_destroy() argument 274 static int type_destroy(void *key, void *datum, void *p) in type_destroy() argument 281 static int user_destroy(void *key, void *datum, void *p) in user_destroy() argument 297 static int sens_destroy(void *key, void *datum, void *p) in sens_destroy() argument 312 static int cat_destroy(void *key, void *datum, void *p) in cat_destroy() argument 331 static int filenametr_destroy(void *key, void *datum, void *p) in filenametr_destroy() argument 348 static int range_tr_destroy(void *key, void *datum, void *p) in range_tr_destroy() argument [all …]
|
D | conditional.c | 24 static int cond_evaluate_expr(struct policydb *p, struct cond_expr *expr) in cond_evaluate_expr() argument 41 s[sp] = p->bool_val_to_struct[node->bool - 1]->state; in cond_evaluate_expr() 92 static void evaluate_cond_node(struct policydb *p, struct cond_node *node) in evaluate_cond_node() argument 98 new_state = cond_evaluate_expr(p, &node->expr); in evaluate_cond_node() 123 void evaluate_cond_nodes(struct policydb *p) in evaluate_cond_nodes() argument 127 for (i = 0; i < p->cond_list_len; i++) in evaluate_cond_nodes() 128 evaluate_cond_node(p, &p->cond_list[i]); in evaluate_cond_nodes() 131 void cond_policydb_init(struct policydb *p) in cond_policydb_init() argument 133 p->bool_val_to_struct = NULL; in cond_policydb_init() 134 p->cond_list = NULL; in cond_policydb_init() [all …]
|
D | mls.h | 31 int mls_compute_context_len(struct policydb *p, struct context *context); 32 void mls_sid_to_context(struct policydb *p, struct context *context, 34 int mls_context_isvalid(struct policydb *p, struct context *c); 35 int mls_range_isvalid(struct policydb *p, struct mls_range *r); 36 int mls_level_isvalid(struct policydb *p, struct mls_level *l); 38 int mls_context_to_sid(struct policydb *p, 45 int mls_from_string(struct policydb *p, char *str, struct context *context, 55 int mls_compute_sid(struct policydb *p, 63 int mls_setup_user_range(struct policydb *p, 68 void mls_export_netlbl_lvl(struct policydb *p, [all …]
|
D | mls.c | 36 int mls_compute_context_len(struct policydb *p, struct context *context) in mls_compute_context_len() argument 43 if (!p->mls_enabled) in mls_compute_context_len() 49 len += strlen(sym_name(p, SYM_LEVELS, index_sens - 1)); in mls_compute_context_len() 59 nm = sym_name(p, SYM_CATS, prev); in mls_compute_context_len() 62 nm = sym_name(p, SYM_CATS, i); in mls_compute_context_len() 69 nm = sym_name(p, SYM_CATS, prev); in mls_compute_context_len() 89 void mls_sid_to_context(struct policydb *p, in mls_sid_to_context() argument 98 if (!p->mls_enabled) in mls_sid_to_context() 107 strcpy(scontextp, sym_name(p, SYM_LEVELS, in mls_sid_to_context() 123 nm = sym_name(p, SYM_CATS, prev); in mls_sid_to_context() [all …]
|
D | conditional.h | 64 void cond_policydb_init(struct policydb *p); 65 void cond_policydb_destroy(struct policydb *p); 67 int cond_init_bool_indexes(struct policydb *p); 68 int cond_destroy_bool(void *key, void *datum, void *p); 72 int cond_read_bool(struct policydb *p, struct symtab *s, void *fp); 73 int cond_read_list(struct policydb *p, void *fp); 75 int cond_write_list(struct policydb *p, void *fp); 81 void evaluate_cond_nodes(struct policydb *p); 82 void cond_policydb_destroy_dup(struct policydb *p);
|
D | policydb.h | 320 extern void policydb_destroy(struct policydb *p); 321 extern int policydb_load_isids(struct policydb *p, struct sidtab *s); 322 extern int policydb_context_isvalid(struct policydb *p, struct context *c); 323 extern int policydb_class_isvalid(struct policydb *p, unsigned int class); 324 extern int policydb_type_isvalid(struct policydb *p, unsigned int type); 325 extern int policydb_role_isvalid(struct policydb *p, unsigned int role); 326 extern int policydb_read(struct policydb *p, void *fp); 327 extern int policydb_write(struct policydb *p, void *fp); 330 struct policydb *p, struct filename_trans_key *key); 333 struct policydb *p, struct range_trans *key); [all …]
|
D | symtab.c | 14 const char *p, *keyp; in symhash() local 21 for (p = keyp; (p - keyp) < size; p++) in symhash() 22 val = (val << 4 | (val >> (8*sizeof(unsigned int)-4))) ^ (*p); in symhash()
|
D | services.c | 604 for (i = 0; i < ARRAY_SIZE(xperms->drivers.p); i++) in services_compute_xperms_drivers() 605 xperms->drivers.p[i] |= node->datum.u.xperms->perms.p[i]; in services_compute_xperms_drivers() 608 security_xperm_set(xperms->drivers.p, in services_compute_xperms_drivers() 733 struct policydb *p = &policy->policydb; in security_validtrans_handle_fail() local 738 if (sidtab_entry_to_string(p, sidtab, oentry, &o, &olen)) in security_validtrans_handle_fail() 740 if (sidtab_entry_to_string(p, sidtab, nentry, &n, &nlen)) in security_validtrans_handle_fail() 742 if (sidtab_entry_to_string(p, sidtab, tentry, &t, &tlen)) in security_validtrans_handle_fail() 747 o, n, t, sym_name(p, SYM_CLASSES, tclass-1)); in security_validtrans_handle_fail() 971 if (!security_xperm_test(node->datum.u.xperms->perms.p, in services_compute_xperms_decision() 981 memset(xpermd->allowed->p, 0xff, in services_compute_xperms_decision() [all …]
|
D | avtab.h | 100 struct avtab_datum *d, void *p), 101 void *p); 104 int avtab_write_item(struct policydb *p, struct avtab_node *cur, void *fp); 105 int avtab_write(struct policydb *p, struct avtab *a, void *fp);
|
D | avtab.c | 400 struct avtab_datum *d, void *p), in avtab_read_item() argument 401 void *p) in avtab_read_item() 409 __le32 buf32[ARRAY_SIZE(xperms.perms.p)]; in avtab_read_item() 475 rc = insertf(a, &key, &datum, p); in avtab_read_item() 536 rc = next_entry(buf32, fp, sizeof(u32)*ARRAY_SIZE(xperms.perms.p)); in avtab_read_item() 541 for (i = 0; i < ARRAY_SIZE(xperms.perms.p); i++) in avtab_read_item() 542 xperms.perms.p[i] = le32_to_cpu(buf32[i]); in avtab_read_item() 557 return insertf(a, &key, &datum, p); in avtab_read_item() 561 struct avtab_datum *d, void *p) in avtab_insertf() argument 610 int avtab_write_item(struct policydb *p, struct avtab_node *cur, void *fp) in avtab_write_item() argument [all …]
|
/security/keys/ |
D | proc.c | 16 static void *proc_keys_start(struct seq_file *p, loff_t *_pos); 17 static void *proc_keys_next(struct seq_file *p, void *v, loff_t *_pos); 18 static void proc_keys_stop(struct seq_file *p, void *v); 28 static void *proc_key_users_start(struct seq_file *p, loff_t *_pos); 29 static void *proc_key_users_next(struct seq_file *p, void *v, loff_t *_pos); 30 static void proc_key_users_stop(struct seq_file *p, void *v); 45 struct proc_dir_entry *p; in key_proc_init() local 47 p = proc_create_seq("keys", 0, NULL, &proc_keys_ops); in key_proc_init() 48 if (!p) in key_proc_init() 51 p = proc_create_seq("key-users", 0, NULL, &proc_key_users_ops); in key_proc_init() [all …]
|
D | keyctl_pkey.c | 42 char *c = params->info, *p, *q; in keyctl_pkey_params_parse() local 45 while ((p = strsep(&c, " \t"))) { in keyctl_pkey_params_parse() 46 if (*p == '\0' || *p == ' ' || *p == '\t') in keyctl_pkey_params_parse() 48 token = match_token(p, param_keys, args); in keyctl_pkey_params_parse() 83 void *p; in keyctl_pkey_params_get() local 89 p = strndup_user(_info, PAGE_SIZE); in keyctl_pkey_params_get() 90 if (IS_ERR(p)) in keyctl_pkey_params_get() 91 return PTR_ERR(p); in keyctl_pkey_params_get() 92 params->info = p; in keyctl_pkey_params_get()
|
D | key.c | 54 struct rb_node *parent, **p; in key_user_lookup() local 58 p = &key_user_tree.rb_node; in key_user_lookup() 62 while (*p) { in key_user_lookup() 63 parent = *p; in key_user_lookup() 67 p = &(*p)->rb_left; in key_user_lookup() 69 p = &(*p)->rb_right; in key_user_lookup() 102 rb_link_node(&candidate->node, parent, p); in key_user_lookup() 136 struct rb_node *parent, **p; in key_alloc_serial() local 151 p = &key_serial_tree.rb_node; in key_alloc_serial() 153 while (*p) { in key_alloc_serial() [all …]
|
D | user_defined.c | 195 char *p; in logon_vet_description() local 198 p = strchr(desc, ':'); in logon_vet_description() 199 if (!p) in logon_vet_description() 203 if (p == desc) in logon_vet_description()
|
/security/apparmor/include/ |
D | policy.h | 211 static inline struct aa_profile *aa_get_newest_profile(struct aa_profile *p) in aa_get_newest_profile() argument 213 return labels_profile(aa_get_newest_label(&p->label)); in aa_get_newest_profile() 243 static inline struct aa_profile *aa_get_profile(struct aa_profile *p) in aa_get_profile() argument 245 if (p) in aa_get_profile() 246 kref_get(&(p->label.count)); in aa_get_profile() 248 return p; in aa_get_profile() 258 static inline struct aa_profile *aa_get_profile_not0(struct aa_profile *p) in aa_get_profile_not0() argument 260 if (p && kref_get_unless_zero(&p->label.count)) in aa_get_profile_not0() 261 return p; in aa_get_profile_not0() 273 static inline struct aa_profile *aa_get_profile_rcu(struct aa_profile __rcu **p) in aa_get_profile_rcu() argument [all …]
|
/security/keys/trusted-keys/ |
D | trusted_tpm1.c | 668 static int key_seal(struct trusted_key_payload *p, in key_seal() argument 679 p->key[p->key_len] = p->migratable; in key_seal() 682 p->key, p->key_len + 1, p->blob, &p->blob_len, in key_seal() 694 static int key_unseal(struct trusted_key_payload *p, in key_unseal() argument 704 ret = tpm_unseal(&tb, o->keyhandle, o->keyauth, p->blob, p->blob_len, in key_unseal() 705 o->blobauth, p->key, &p->key_len); in key_unseal() 710 p->migratable = p->key[--p->key_len]; in key_unseal() 747 char *p = c; in getoptions() local 763 while ((p = strsep(&c, " \t"))) { in getoptions() 764 if (*p == '\0' || *p == ' ' || *p == '\t') in getoptions() [all …]
|
/security/tomoyo/ |
D | util.c | 849 static bool tomoyo_path_matches_pattern2(const char *f, const char *p) in tomoyo_path_matches_pattern2() argument 854 while (*f && *p) { in tomoyo_path_matches_pattern2() 858 p_delimiter = strchr(p, '/'); in tomoyo_path_matches_pattern2() 860 p_delimiter = p + strlen(p); in tomoyo_path_matches_pattern2() 861 if (*p == '\\' && *(p + 1) == '{') in tomoyo_path_matches_pattern2() 863 if (!tomoyo_file_matches_pattern(f, f_delimiter, p, in tomoyo_path_matches_pattern2() 869 p = p_delimiter; in tomoyo_path_matches_pattern2() 870 if (*p) in tomoyo_path_matches_pattern2() 871 p++; in tomoyo_path_matches_pattern2() 874 while (*p == '\\' && in tomoyo_path_matches_pattern2() [all …]
|
D | realpath.c | 27 const char *p = str; in tomoyo_encode2() local 31 if (!p) in tomoyo_encode2() 34 const unsigned char c = p[i]; in tomoyo_encode2() 49 p = str; in tomoyo_encode2() 51 const unsigned char c = p[i]; in tomoyo_encode2()
|
D | audit.c | 30 unsigned long pos = bprm->p; in tomoyo_print_bprm() 335 struct tomoyo_profile *p; in tomoyo_get_audit() local 339 p = tomoyo_profile(ns, profile); in tomoyo_get_audit() 340 if (tomoyo_log_count >= p->pref[TOMOYO_PREF_MAX_AUDIT_LOG]) in tomoyo_get_audit() 345 mode = p->config[index]; in tomoyo_get_audit() 347 mode = p->config[category]; in tomoyo_get_audit() 349 mode = p->default_config; in tomoyo_get_audit()
|
/security/integrity/platform_certs/ |
D | keyring_handler.c | 25 char *hash, *p; in uefi_blacklist_hash() local 30 p = memcpy(hash, type, type_len); in uefi_blacklist_hash() 31 p += type_len; in uefi_blacklist_hash() 32 bin2hex(p, data, len); in uefi_blacklist_hash() 33 p += len * 2; in uefi_blacklist_hash() 34 *p = 0; in uefi_blacklist_hash()
|
/security/integrity/ |
D | iint.c | 126 struct rb_node **p; in integrity_inode_get() local 150 p = &integrity_iint_tree.rb_node; in integrity_inode_get() 151 while (*p) { in integrity_inode_get() 152 parent = *p; in integrity_inode_get() 156 p = &(*p)->rb_left; in integrity_inode_get() 158 p = &(*p)->rb_right; in integrity_inode_get() 169 rb_link_node(node, parent, p); in integrity_inode_get()
|
/security/apparmor/ |
D | policy.c | 506 struct aa_profile *p, *profile; in aa_new_null_profile() local 552 p = __find_child(&parent->base.profiles, bname); in aa_new_null_profile() 553 if (p) { in aa_new_null_profile() 555 profile = aa_get_profile(p); in aa_new_null_profile() 750 struct aa_profile *p; in __replace_profile() local 753 p = __find_child(&new->base.profiles, child->base.name); in __replace_profile() 754 if (p) { in __replace_profile() 756 __replace_profile(child, p); in __replace_profile() 763 p = aa_deref_parent(child); in __replace_profile() 766 aa_put_profile(p); in __replace_profile() [all …]
|
/security/selinux/ |
D | avc.c | 210 rc = security_xperm_test(xpd->allowed->p, perm); in avc_xperms_has_perm() 213 rc = security_xperm_test(xpd->auditallow->p, perm); in avc_xperms_has_perm() 216 rc = security_xperm_test(xpd->dontaudit->p, perm); in avc_xperms_has_perm() 224 security_xperm_set(xp_node->xp.drivers.p, driver); in avc_xperms_allow_perm() 227 security_xperm_set(xpd->allowed->p, perm); in avc_xperms_allow_perm() 264 memcpy(dest->allowed->p, src->allowed->p, in avc_copy_xperms_decision() 265 sizeof(src->allowed->p)); in avc_copy_xperms_decision() 267 memcpy(dest->auditallow->p, src->auditallow->p, in avc_copy_xperms_decision() 268 sizeof(src->auditallow->p)); in avc_copy_xperms_decision() 270 memcpy(dest->dontaudit->p, src->dontaudit->p, in avc_copy_xperms_decision() [all …]
|
/security/integrity/ima/ |
D | ima_modsig.c | 47 const void *p; in ima_read_modsig() local 53 p = buf + buf_len - marker_len; in ima_read_modsig() 54 if (memcmp(p, MODULE_SIG_STRING, marker_len)) in ima_read_modsig() 58 sig = (const struct module_signature *)(p - sizeof(*sig)); in ima_read_modsig()
|
/security/safesetid/ |
D | securityfs.c | 143 char *buf, *p, *end; in handle_policy_update() local 153 p = buf = memdup_user_nul(ubuf, len); in handle_policy_update() 165 while (*p != '\0') { in handle_policy_update() 168 end = strchr(p, '\n'); in handle_policy_update() 182 err = parse_policy_line(file, p, rule); in handle_policy_update() 193 p = end + 1; in handle_policy_update()
|