Lines Matching refs:error
64 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()
637 if (error) { in profile_transition()
641 error = 0; in profile_transition()
669 error = -EACCES; in profile_transition()
680 error = -EACCES; in profile_transition()
707 error = -ENOMEM; in profile_transition()
710 error = -EACCES; in profile_transition()
716 error = -EACCES; in profile_transition()
734 cond->uid, info, error); in profile_transition()
737 return ERR_PTR(error); in profile_transition()
751 int error = -EACCES; in profile_onexec() local
768 error = aa_path_name(&bprm->file->f_path, profile->path_flags, buffer, in profile_onexec()
770 if (error) { in profile_onexec()
774 error = 0; in profile_onexec()
791 error = change_profile_perms(profile, onexec, stack, AA_MAY_ONEXEC, in profile_onexec()
793 if (error) { in profile_onexec()
810 NULL, onexec, cond->uid, info, error); in profile_onexec()
823 int error; in handle_onexec() local
831 error = fn_for_each_in_ns(label, profile, in handle_onexec()
834 if (error) in handle_onexec()
835 return ERR_PTR(error); in handle_onexec()
843 error = fn_for_each_in_ns(label, profile, in handle_onexec()
846 if (error) in handle_onexec()
847 return ERR_PTR(error); in handle_onexec()
859 error = fn_for_each_in_ns(label, profile, in handle_onexec()
864 return ERR_PTR(error); in handle_onexec()
882 int error = 0; in apparmor_bprm_set_creds() local
922 error = PTR_ERR(new); in apparmor_bprm_set_creds()
925 error = -ENOMEM; in apparmor_bprm_set_creds()
939 error = -EPERM; in apparmor_bprm_set_creds()
951 error = may_change_ptraced_domain(new, &info); in apparmor_bprm_set_creds()
952 if (error) in apparmor_bprm_set_creds()
984 return error; in apparmor_bprm_set_creds()
987 error = fn_for_each(label, profile, in apparmor_bprm_set_creds()
991 error)); in apparmor_bprm_set_creds()
1010 int error = 0; in build_change_hat() local
1018 error = -EPERM; in build_change_hat()
1024 error = -ENOENT; in build_change_hat()
1030 error = -ENOMEM; in build_change_hat()
1040 error); in build_change_hat()
1041 if (!hat || (error && error != -ENOENT)) in build_change_hat()
1042 return ERR_PTR(error); in build_change_hat()
1061 int i, error; in change_hat() local
1080 error = -EPERM; in change_hat()
1091 error = -EPERM; in change_hat()
1112 error = -ENOENT; in change_hat()
1117 error = -ECHILD; in change_hat()
1131 GLOBAL_ROOT_UID, info, error); in change_hat()
1134 return ERR_PTR(error); in change_hat()
1142 error = -ENOMEM; in change_hat()
1174 int error = 0; in aa_change_hat() local
1193 error = -EPERM; in aa_change_hat()
1201 error = PTR_ERR(new); in aa_change_hat()
1207 error = may_change_ptraced_domain(new, &info); in aa_change_hat()
1208 if (error) in aa_change_hat()
1219 error = -EPERM; in aa_change_hat()
1227 error = aa_set_current_hat(new, token); in aa_change_hat()
1228 if (error == -EACCES) in aa_change_hat()
1240 error = -EPERM; in aa_change_hat()
1248 error = aa_restore_previous_label(token); in aa_change_hat()
1249 if (error) { in aa_change_hat()
1250 if (error == -EACCES) in aa_change_hat()
1262 return error; in aa_change_hat()
1272 GLOBAL_ROOT_UID, info, error)); in aa_change_hat()
1284 int error = 0; in change_profile_perms_wrapper() local
1286 if (!error) in change_profile_perms_wrapper()
1287 error = change_profile_perms(profile, target, stack, request, in change_profile_perms_wrapper()
1289 if (error) in change_profile_perms_wrapper()
1290 error = aa_audit_file(profile, perms, op, request, name, in change_profile_perms_wrapper()
1292 error); in change_profile_perms_wrapper()
1294 return error; in change_profile_perms_wrapper()
1320 int error = 0; in aa_change_profile() local
1367 error = PTR_ERR(target); in aa_change_profile()
1381 error = -ENOMEM; in aa_change_profile()
1396 error = fn_for_each_in_ns(label, profile, in aa_change_profile()
1400 if (error) in aa_change_profile()
1408 error = may_change_ptraced_domain(target, &info); in aa_change_profile()
1409 if (error && !fn_for_each_in_ns(label, profile, in aa_change_profile()
1436 error = -EPERM; in aa_change_profile()
1448 error = -ENOMEM; in aa_change_profile()
1450 error = PTR_ERR(new); in aa_change_profile()
1455 error = aa_replace_current_label(new); in aa_change_profile()
1463 error = aa_set_current_onexec(target, stack); in aa_change_profile()
1467 error = fn_for_each_in_ns(label, profile, in aa_change_profile()
1470 GLOBAL_ROOT_UID, info, error)); in aa_change_profile()
1477 return error; in aa_change_profile()