Home
last modified time | relevance | path

Searched refs:error (Results 1 – 25 of 54) sorted by relevance

123

/security/apparmor/
Dcrypto.c32 int error = -ENOMEM; in aa_calc_hash() local
43 error = crypto_shash_init(desc); in aa_calc_hash()
44 if (error) in aa_calc_hash()
46 error = crypto_shash_update(desc, (u8 *) data, len); in aa_calc_hash()
47 if (error) in aa_calc_hash()
49 error = crypto_shash_final(desc, hash); in aa_calc_hash()
50 if (error) in aa_calc_hash()
58 return ERR_PTR(error); in aa_calc_hash()
65 int error = -ENOMEM; in aa_calc_profile_hash() local
80 error = crypto_shash_init(desc); in aa_calc_profile_hash()
[all …]
Dmount.c134 struct aa_perms *perms, const char *info, int error) in audit_mount() argument
139 if (likely(!error)) { in audit_mount()
165 return error; in audit_mount()
176 aad(&sa)->error = error; in audit_mount()
323 int pos, error; in match_mnt_path_str() local
332 error = aa_path_name(mntpath, path_flags(profile, mntpath), buffer, in match_mnt_path_str()
334 if (error) in match_mnt_path_str()
337 error = PTR_ERR(devname); in match_mnt_path_str()
343 error = -EACCES; in match_mnt_path_str()
351 error = 0; in match_mnt_path_str()
[all …]
Dpath.c51 int error = 0; in disconnect() local
59 error = -EACCES; in disconnect()
65 error = prepend(name, *name - buf, "/", 1); in disconnect()
66 if (!error && disconnected) in disconnect()
67 error = prepend(name, *name - buf, disconnected, in disconnect()
71 return error; in disconnect()
92 int error = 0; in d_namespace_path() local
110 error = prepend(name, *name - buf, "/proc", 5); in d_namespace_path()
113 error = disconnect(path, buf, name, flags, in d_namespace_path()
135 error = -ENAMETOOLONG; in d_namespace_path()
[all …]
Ddomain.c64 int error = 0; in may_change_ptraced_domain() local
76 error = aa_may_ptrace(tracerl, to_label, PTRACE_MODE_ATTACH); in may_change_ptraced_domain()
82 if (error) in may_change_ptraced_domain()
84 return error; in may_change_ptraced_domain()
257 int error; in label_match() local
260 error = label_compound_match(profile, label, stack, state, subns, in label_match()
262 if (!error) in label_match()
263 return error; in label_match()
629 int error = 0; in profile_transition() local
635 error = aa_path_name(&bprm->file->f_path, profile->path_flags, buffer, in profile_transition()
[all …]
Dcapability.c65 int cap, int error) in audit_caps() argument
70 aad(sa)->error = error; in audit_caps()
72 if (likely(!error)) { in audit_caps()
85 return error; in audit_caps()
93 return complain_error(error); in audit_caps()
94 return error; in audit_caps()
117 int error; in profile_capable() local
121 error = 0; in profile_capable()
123 error = -EPERM; in profile_capable()
127 return error; in profile_capable()
[all …]
Dlsm.c109 int error; in apparmor_ptrace_access_check() local
113 error = aa_may_ptrace(tracer, tracee, in apparmor_ptrace_access_check()
119 return error; in apparmor_ptrace_access_check()
125 int error; in apparmor_ptrace_traceme() local
129 error = aa_may_ptrace(tracer, tracee, AA_PTRACE_TRACE); in apparmor_ptrace_traceme()
133 return error; in apparmor_ptrace_traceme()
174 int error = 0; in apparmor_capable() local
178 error = aa_capable(label, cap, opts); in apparmor_capable()
181 return error; in apparmor_capable()
197 int error = 0; in common_perm() local
[all …]
Dfile.c104 kuid_t ouid, const char *info, int error) in aa_audit_file() argument
116 aad(&sa)->error = error; in aa_audit_file()
119 if (likely(!aad(&sa)->error)) { in aa_audit_file()
146 return aad(&sa)->error; in aa_audit_file()
172 int error; in path_name() local
174 error = aa_path_name(path, flags, buffer, name, &info, in path_name()
176 if (error) { in path_name()
179 NULL, NULL, cond->uid, info, error)); in path_name()
180 return error; in path_name()
299 int error; in profile_path_perm() local
[all …]
Dapparmorfs.c139 int error; in apparmorfs_fill_super() local
141 error = simple_fill_super(sb, AAFS_MAGIC, files); in apparmorfs_fill_super()
142 if (error) in apparmorfs_fill_super()
143 return error; in apparmorfs_fill_super()
238 int error; in aafs_create() local
246 error = simple_pin_fs(&aafs_ops, &aafs_mnt, &aafs_count); in aafs_create()
247 if (error) in aafs_create()
248 return ERR_PTR(error); in aafs_create()
255 error = PTR_ERR(dentry); in aafs_create()
260 error = -EEXIST; in aafs_create()
[all …]
Dpolicy.c619 const char *info, int error) in audit_policy() argument
626 aad(&sa)->error = error; in audit_policy()
631 return error; in audit_policy()
802 int error = replacement_allowed(*p, noreplace, info); in __lookup_replace() local
803 if (error) { in __lookup_replace()
805 return error; in __lookup_replace()
864 ssize_t count, error; in aa_replace_profiles() local
870 error = aa_unpack(udata, &lh, &ns_name); in aa_replace_profiles()
871 if (error) in aa_replace_profiles()
885 error = -EACCES; in aa_replace_profiles()
[all …]
Dpolicy_unpack.c106 int error) in audit_iface() argument
118 aad(&sa)->error = error; in audit_iface()
680 int i, error = -EPROTO; in unpack_profile() local
717 error = PTR_ERR(profile->xmatch); in unpack_profile()
824 error = PTR_ERR(profile->policy.dfa); in unpack_profile()
828 error = -EPROTO; in unpack_profile()
849 error = PTR_ERR(profile->file.dfa); in unpack_profile()
925 audit_iface(profile, NULL, name, info, e, error); in unpack_profile()
928 return ERR_PTR(error); in unpack_profile()
941 int error = -EPROTONOSUPPORT; in verify_header() local
[all …]
Dresource.c54 const char *info, int error) in audit_resource() argument
62 aad(&sa)->error = error; in audit_resource()
109 int error = 0; in aa_task_setrlimit() local
124 error = fn_for_each(label, profile, in aa_task_setrlimit()
129 error = fn_for_each_confined(label, profile, in aa_task_setrlimit()
133 return error; in aa_task_setrlimit()
Dmatch.c36 int error; in aa_setup_dfa_engine() local
42 error = PTR_ERR(nulldfa); in aa_setup_dfa_engine()
44 return error; in aa_setup_dfa_engine()
54 error = PTR_ERR(stacksplitdfa); in aa_setup_dfa_engine()
56 return error; in aa_setup_dfa_engine()
147 int error = -EPROTO; in verify_table_headers() local
180 error = 0; in verify_table_headers()
182 return error; in verify_table_headers()
197 int error = -EPROTO; in verify_dfa() local
234 error = 0; in verify_dfa()
[all …]
Daudit.c72 if (aad(sa)->error) in audit_pre()
73 audit_log_format(ab, " error=%d", aad(sa)->error); in audit_pre()
131 if (likely(!aad(sa)->error)) { in aa_audit()
143 return aad(sa)->error; in aa_audit()
158 return complain_error(aad(sa)->error); in aa_audit()
160 return aad(sa)->error; in aa_audit()
/security/keys/
Dkeyctl.c85 goto error; in SYSCALL_DEFINE5()
90 goto error; in SYSCALL_DEFINE5()
97 goto error; in SYSCALL_DEFINE5()
151 error: in SYSCALL_DEFINE5()
183 goto error; in SYSCALL_DEFINE4()
189 goto error; in SYSCALL_DEFINE4()
248 error: in SYSCALL_DEFINE4()
269 goto error; in keyctl_get_keyring_ID()
274 error: in keyctl_get_keyring_ID()
300 goto error; in keyctl_join_session_keyring()
[all …]
Dprocess_keys.c113 goto error; in look_up_user_keyrings()
117 goto error; in look_up_user_keyrings()
175 error: in look_up_user_keyrings()
633 goto error; in lookup_user_key()
638 goto error; in lookup_user_key()
651 goto error; in lookup_user_key()
656 goto error; in lookup_user_key()
672 goto error; in lookup_user_key()
680 goto error; in lookup_user_key()
687 goto error; in lookup_user_key()
[all …]
/security/tomoyo/
Dfile.c393 int error; in tomoyo_update_path_acl() local
396 error = -EINVAL; in tomoyo_update_path_acl()
398 error = tomoyo_update_domain(&e.head, sizeof(e), param, in tomoyo_update_path_acl()
402 return error; in tomoyo_update_path_acl()
469 int error; in tomoyo_update_mkdev_acl() local
475 error = -EINVAL; in tomoyo_update_mkdev_acl()
477 error = tomoyo_update_domain(&e.head, sizeof(e), param, in tomoyo_update_mkdev_acl()
484 return error; in tomoyo_update_mkdev_acl()
548 int error; in tomoyo_update_path2_acl() local
552 error = -EINVAL; in tomoyo_update_path2_acl()
[all …]
Denviron.c53 int error; in tomoyo_env_perm() local
63 error = tomoyo_audit_env_log(r); in tomoyo_env_perm()
64 } while (error == TOMOYO_RETRY_REQUEST); in tomoyo_env_perm()
65 return error; in tomoyo_env_perm()
97 int error = -ENOMEM; in tomoyo_write_env() local
104 return error; in tomoyo_write_env()
105 error = tomoyo_update_domain(&e.head, sizeof(e), param, in tomoyo_write_env()
108 return error; in tomoyo_write_env()
Dmount.c92 int error = -ENOMEM; in tomoyo_mount_acl() local
107 error = -ENOMEM; in tomoyo_mount_acl()
127 error = -ENODEV; in tomoyo_mount_acl()
137 error = -ENOENT; in tomoyo_mount_acl()
143 error = -ENOENT; in tomoyo_mount_acl()
152 error = -ENOMEM; in tomoyo_mount_acl()
166 error = tomoyo_audit_mount_log(r); in tomoyo_mount_acl()
167 } while (error == TOMOYO_RETRY_REQUEST); in tomoyo_mount_acl()
177 return error; in tomoyo_mount_acl()
196 int error; in tomoyo_mount_permission() local
[all …]
Ddomain.c38 int error = param->is_delete ? -ENOENT : -ENOMEM; in tomoyo_update_policy() local
51 error = 0; in tomoyo_update_policy()
54 if (error && !param->is_delete) { in tomoyo_update_policy()
58 error = 0; in tomoyo_update_policy()
62 return error; in tomoyo_update_policy()
103 int error = is_delete ? -ENOENT : -ENOMEM; in tomoyo_update_domain() local
135 error = 0; in tomoyo_update_domain()
138 if (error && !is_delete) { in tomoyo_update_domain()
142 error = 0; in tomoyo_update_domain()
148 return error; in tomoyo_update_domain()
[all …]
Dnetwork.c285 int error = -EINVAL; in tomoyo_write_inet_network() local
311 error = tomoyo_update_domain(&e.head, sizeof(e), param, in tomoyo_write_inet_network()
317 return error; in tomoyo_write_inet_network()
330 int error; in tomoyo_write_unix_network() local
345 error = tomoyo_update_domain(&e.head, sizeof(e), param, in tomoyo_write_unix_network()
349 return error; in tomoyo_write_unix_network()
471 int error = 0; in tomoyo_inet_entry() local
484 error = tomoyo_audit_inet_log(&r); in tomoyo_inet_entry()
485 } while (error == TOMOYO_RETRY_REQUEST); in tomoyo_inet_entry()
488 return error; in tomoyo_inet_entry()
[all …]
Dsecurityfs_if.c45 int error; in tomoyo_write_self() local
66 error = -EPERM; in tomoyo_write_self()
71 error = -ENOENT; in tomoyo_write_self()
80 error = 0; in tomoyo_write_self()
85 error = -EINVAL; in tomoyo_write_self()
87 return error ? error : count; in tomoyo_write_self()
Dgroup.c77 int error = -EINVAL; in tomoyo_write_group() local
87 error = -ENOMEM; in tomoyo_write_group()
90 error = tomoyo_update_policy(&e.head, sizeof(e), param, in tomoyo_write_group()
99 error = tomoyo_update_policy(&e.head, sizeof(e), param, in tomoyo_write_group()
111 error = tomoyo_update_policy(&e.head, sizeof(e), param, in tomoyo_write_group()
116 return error; in tomoyo_write_group()
/security/
Dinode.c43 int error; in securityfs_fill_super() local
45 error = simple_fill_super(sb, SECURITYFS_MAGIC, files); in securityfs_fill_super()
46 if (error) in securityfs_fill_super()
47 return error; in securityfs_fill_super()
114 int error; in securityfs_create_dentry() local
121 error = simple_pin_fs(&fs_type, &mount, &mount_count); in securityfs_create_dentry()
122 if (error) in securityfs_create_dentry()
123 return ERR_PTR(error); in securityfs_create_dentry()
136 error = -EEXIST; in securityfs_create_dentry()
142 error = -ENOMEM; in securityfs_create_dentry()
[all …]
/security/integrity/evm/
Devm_main.c96 int error; in evm_find_protected_xattrs() local
103 error = __vfs_getxattr(dentry, inode, xattr->name, NULL, 0, in evm_find_protected_xattrs()
105 if (error < 0) { in evm_find_protected_xattrs()
106 if (error == -ENODATA) in evm_find_protected_xattrs()
108 return error; in evm_find_protected_xattrs()
562 int error; in init_evm() local
567 error = integrity_init_keyring(INTEGRITY_KEYRING_EVM); in init_evm()
568 if (error) in init_evm()
569 goto error; in init_evm()
571 error = evm_init_secfs(); in init_evm()
[all …]
/security/apparmor/include/
Daudit.h108 int error; member
175 aad((SA))->error = (ERROR); \
177 aad((SA))->error; \
181 static inline int complain_error(int error) in complain_error() argument
183 if (error == -EPERM || error == -EACCES) in complain_error()
185 return error; in complain_error()

123