Home
last modified time | relevance | path

Searched refs:result (Results 1 – 25 of 29) sorted by relevance

12

/security/integrity/ima/
Dima_api.c43 int i, result = 0; in ima_alloc_init_template() local
70 result = field->field_init(event_data, in ima_alloc_init_template()
72 if (result != 0) in ima_alloc_init_template()
83 return result; in ima_alloc_init_template()
109 int result; in ima_store_template() local
112 result = ima_calc_field_array_hash(&entry->template_data[0], in ima_store_template()
114 if (result < 0) { in ima_store_template()
117 audit_cause, result, 0); in ima_store_template()
118 return result; in ima_store_template()
122 result = ima_add_template_entry(entry, violation, op, inode, filename); in ima_store_template()
[all …]
Dima_queue.c140 int result = 0; in ima_pcr_extend() local
143 return result; in ima_pcr_extend()
145 result = tpm_pcr_extend(ima_tpm_chip, pcr, digests_arg); in ima_pcr_extend()
146 if (result != 0) in ima_pcr_extend()
147 pr_err("Error Communicating to TPM chip, result: %d\n", result); in ima_pcr_extend()
148 return result; in ima_pcr_extend()
168 int result = 0, tpmresult = 0; in ima_add_template_entry() local
174 result = -EEXIST; in ima_add_template_entry()
179 result = ima_add_digest_entry(entry, in ima_add_template_entry()
181 if (result < 0) { in ima_add_template_entry()
[all …]
Dima_init.c50 int result = -ENOMEM; in ima_add_boot_aggregate() local
76 result = ima_calc_boot_aggregate(&hash.hdr); in ima_add_boot_aggregate()
77 if (result < 0) { in ima_add_boot_aggregate()
83 result = ima_alloc_init_template(&event_data, &entry, NULL); in ima_add_boot_aggregate()
84 if (result < 0) { in ima_add_boot_aggregate()
89 result = ima_store_template(entry, violation, NULL, in ima_add_boot_aggregate()
92 if (result < 0) { in ima_add_boot_aggregate()
100 audit_cause, result, 0); in ima_add_boot_aggregate()
101 return result; in ima_add_boot_aggregate()
Dima_policy.c448 int result; in ima_lsm_update_rules() local
454 result = ima_lsm_update_rule(entry); in ima_lsm_update_rules()
455 if (result) { in ima_lsm_update_rules()
456 pr_err("lsm rule update error %d\n", result); in ima_lsm_update_rules()
541 bool result = false; in ima_match_rules() local
628 result = false; in ima_match_rules()
632 result = true; in ima_match_rules()
640 return result; in ima_match_rules()
870 int result; in ima_init_arch_policy() local
872 result = strlcpy(rule, *rules, sizeof(rule)); in ima_init_arch_policy()
[all …]
Dima_appraise.c646 int result; in ima_inode_setxattr() local
649 result = ima_protect_xattr(dentry, xattr_name, xattr_value, in ima_inode_setxattr()
651 if (result == 1) { in ima_inode_setxattr()
663 if (result == 1 || evm_revalidate_status(xattr_name)) { in ima_inode_setxattr()
665 if (result == 1) in ima_inode_setxattr()
666 result = 0; in ima_inode_setxattr()
668 return result; in ima_inode_setxattr()
673 int result; in ima_inode_removexattr() local
675 result = ima_protect_xattr(dentry, xattr_name, NULL, 0); in ima_inode_removexattr()
676 if (result == 1 || evm_revalidate_status(xattr_name)) { in ima_inode_removexattr()
[all …]
Dima_fs.c318 ssize_t result; in ima_write_policy() local
324 result = -EINVAL; in ima_write_policy()
330 result = PTR_ERR(data); in ima_write_policy()
334 result = mutex_lock_interruptible(&ima_write_mutex); in ima_write_policy()
335 if (result < 0) in ima_write_policy()
339 result = ima_read_policy(data); in ima_write_policy()
345 result = -EACCES; in ima_write_policy()
347 result = ima_parse_add_rule(data); in ima_write_policy()
353 if (result < 0) in ima_write_policy()
356 return result; in ima_write_policy()
Dima_template.c292 int result; in ima_init_template() local
294 result = template_desc_init_fields(template->fmt, in ima_init_template()
297 if (result < 0) { in ima_init_template()
300 template->name : template->fmt), result); in ima_init_template()
301 return result; in ima_init_template()
310 result = template_desc_init_fields(template->fmt, in ima_init_template()
313 if (result < 0) in ima_init_template()
316 template->name : template->fmt), result); in ima_init_template()
318 return result; in ima_init_template()
Dima_template_lib.c317 int result; in ima_eventdigest_init() local
333 result = ima_calc_boot_aggregate(&hash.hdr); in ima_eventdigest_init()
336 if (!result && hash.hdr.algo != HASH_ALGO_SHA1) in ima_eventdigest_init()
337 result = -EINVAL; in ima_eventdigest_init()
339 if (result < 0) in ima_eventdigest_init()
354 result = ima_calc_file_hash(event_data->file, &hash.hdr); in ima_eventdigest_init()
355 if (result) { in ima_eventdigest_init()
358 "failed", result, 0); in ima_eventdigest_init()
359 return result; in ima_eventdigest_init()
Dima_main.c456 int result = 0; in ima_file_mprotect() local
477 result = -EPERM; in ima_file_mprotect()
482 "collect_data", "failed-mprotect", result, 0); in ima_file_mprotect()
486 return result; in ima_file_mprotect()
/security/safesetid/
Dlsm.c36 enum sid_policy_type result = SIDPOL_DEFAULT; in _setid_policy_lookup() local
44 result = SIDPOL_CONSTRAINED; in _setid_policy_lookup()
53 result = SIDPOL_CONSTRAINED; in _setid_policy_lookup()
57 result = SIDPOL_CONSTRAINED; in _setid_policy_lookup()
59 return result; in _setid_policy_lookup()
68 enum sid_policy_type result = SIDPOL_DEFAULT; in setid_policy_lookup() local
77 result = SIDPOL_CONSTRAINED; in setid_policy_lookup()
79 return result; in setid_policy_lookup()
84 result = _setid_policy_lookup(pol, src, dst); in setid_policy_lookup()
87 return result; in setid_policy_lookup()
/security/selinux/include/
Davc.h54 int result; member
66 int result, in avc_audit_required() argument
92 } else if (result) in avc_audit_required()
102 u32 requested, u32 audited, u32 denied, int result,
128 int result, in avc_audit() argument
132 audited = avc_audit_required(requested, avd, result, 0, &denied); in avc_audit()
136 requested, audited, denied, result, in avc_audit()
/security/tomoyo/
Dcondition.c34 bool result; in tomoyo_argv() local
40 result = tomoyo_path_matches_pattern(&arg, argv->value); in tomoyo_argv()
42 result = !result; in tomoyo_argv()
43 if (!result) in tomoyo_argv()
73 bool result; in tomoyo_envp() local
79 result = tomoyo_path_matches_pattern(&value, in tomoyo_envp()
82 result = !result; in tomoyo_envp()
84 result = true; in tomoyo_envp()
86 result = !result; in tomoyo_envp()
88 if (!result) in tomoyo_envp()
[all …]
Dutil.c185 u8 tomoyo_parse_ulong(unsigned long *result, char **str) in tomoyo_parse_ulong() argument
202 *result = simple_strtoul(cp, &ep, base); in tomoyo_parse_ulong()
824 bool result; in tomoyo_file_matches_pattern() local
830 result = tomoyo_file_matches_pattern2(filename, in tomoyo_file_matches_pattern()
835 result = !result; in tomoyo_file_matches_pattern()
836 if (result) in tomoyo_file_matches_pattern()
841 result = tomoyo_file_matches_pattern2(filename, filename_end, in tomoyo_file_matches_pattern()
843 return first ? result : !result; in tomoyo_file_matches_pattern()
/security/integrity/
Dintegrity_audit.c30 const char *cause, int result, int audit_info) in integrity_audit_msg() argument
33 result, audit_info, 0); in integrity_audit_msg()
38 const char *cause, int result, int audit_info, in integrity_audit_message() argument
67 audit_log_format(ab, " res=%d errno=%d", !result, errno); in integrity_audit_message()
Dintegrity.h242 const char *cause, int result, int info);
246 const char *cause, int result, int info,
259 int result, int info) in integrity_audit_msg() argument
267 int result, int info, int errno) in integrity_audit_message() argument
/security/smack/
Dsmack_access.c317 sad->result ? "denied" : "granted"); in smack_log_callback()
340 int result, struct smk_audit_info *ad) in smack_log() argument
351 if (result < 0 && (log_policy & SMACK_AUDIT_DENIED) == 0) in smack_log()
353 if (result == 0 && (log_policy & SMACK_AUDIT_ACCEPT) == 0) in smack_log()
372 if (result == SMACK_UNCONFINED_SUBJECT) in smack_log()
374 else if (result == SMACK_UNCONFINED_OBJECT) in smack_log()
377 if (result > 0) in smack_log()
378 result = 0; in smack_log()
381 sad->result = result; in smack_log()
387 int result, struct smk_audit_info *ad) in smack_log() argument
Dsmack.h269 int result; member
450 int result, struct smk_audit_info *auditdata);
/security/selinux/
Dstatus.c45 struct page *result = NULL; in selinux_kernel_status_page() local
68 result = state->status_page; in selinux_kernel_status_page()
71 return result; in selinux_kernel_status_page()
Davc.c394 int result, in avc_xperms_audit_required() argument
406 } else if (result) { in avc_xperms_audit_required()
424 u8 perm, int result, in avc_xperms_audit() argument
430 requested, avd, xpd, perm, result, &denied); in avc_xperms_audit()
434 audited, denied, result, ad); in avc_xperms_audit()
742 audit_log_format(ab, " permissive=%u", sad->result ? 0 : 1); in avc_audit_post_callback()
777 u32 requested, u32 audited, u32 denied, int result, in slow_avc_audit() argument
797 sad.result = result; in slow_avc_audit()
/security/keys/
Dkeyring.c595 ctx->result = ERR_PTR(-EKEYREVOKED); in keyring_search_iterator()
602 ctx->result = ERR_PTR(-EKEYEXPIRED); in keyring_search_iterator()
618 ctx->result = ERR_PTR(-EACCES); in keyring_search_iterator()
626 ctx->result = ERR_PTR(state); in keyring_search_iterator()
633 ctx->result = make_key_ref(key, ctx->possessed); in keyring_search_iterator()
785 ctx->result = ERR_PTR(-ELOOP); in search_nested_keyrings()
853 key = key_ref_to_ptr(ctx->result); in search_nested_keyrings()
907 ctx->result = ERR_PTR(-EAGAIN); in keyring_search_rcu()
923 __key_get(key_ref_to_ptr(ctx->result)); in keyring_search_rcu()
924 return ctx->result; in keyring_search_rcu()
[all …]
DKconfig25 bool "Enable temporary caching of the last request_key() result"
28 This option causes the result of the last successful request_key()
/security/keys/trusted-keys/
Dtrusted_tpm1.c179 uint32_t result; in TSS_checkhmac1() local
197 result = LOAD32N(buffer, TPM_RETURN_OFFSET); in TSS_checkhmac1()
214 ret = crypto_shash_update(&sdesc->shash, (const u8 *)&result, in TSS_checkhmac1()
215 sizeof result); in TSS_checkhmac1()
266 uint32_t result; in TSS_checkhmac2() local
285 result = LOAD32N(buffer, TPM_RETURN_OFFSET); in TSS_checkhmac2()
307 ret = crypto_shash_update(&sdesc->shash, (const u8 *)&result, in TSS_checkhmac2()
308 sizeof result); in TSS_checkhmac2()
/security/apparmor/
Dlabel.c678 int result = label_cmp(label, this); in __label_insert() local
681 if (result == 0) { in __label_insert()
694 } else if (result < 0) in __label_insert()
731 int result = vec_cmp(this->vec, this->size, vec, n); in __vec_find() local
733 if (result > 0) in __vec_find()
735 else if (result < 0) in __vec_find()
1157 int result = label_merge_cmp(a, b, this); in __label_find_merge() local
1159 if (result < 0) in __label_find_merge()
1161 else if (result > 0) in __label_find_merge()
/security/selinux/ss/
Dservices.c214 u32 result; in map_decision() local
216 for (i = 0, result = 0; i < n; i++) { in map_decision()
218 result |= 1<<i; in map_decision()
220 result |= 1<<i; in map_decision()
222 avd->allowed = result; in map_decision()
224 for (i = 0, result = 0; i < n; i++) in map_decision()
226 result |= 1<<i; in map_decision()
227 avd->auditallow = result; in map_decision()
229 for (i = 0, result = 0; i < n; i++) { in map_decision()
231 result |= 1<<i; in map_decision()
[all …]
/security/
Dsecurity.c319 static int lsm_append(const char *new, char **result);
453 static int lsm_append(const char *new, char **result) in lsm_append() argument
457 if (*result == NULL) { in lsm_append()
458 *result = kstrdup(new, GFP_KERNEL); in lsm_append()
459 if (*result == NULL) in lsm_append()
463 if (match_last_lsm(*result, new)) in lsm_append()
465 cp = kasprintf(GFP_KERNEL, "%s,%s", *result, new); in lsm_append()
468 kfree(*result); in lsm_append()
469 *result = cp; in lsm_append()

12