Lines Matching refs:error

64 	int error = 0;  in may_change_ptraced_domain()  local
76 error = aa_may_ptrace(tracerp, to_profile, PTRACE_MODE_ATTACH); in may_change_ptraced_domain()
82 return error; in may_change_ptraced_domain()
350 int error = cap_bprm_set_creds(bprm); in apparmor_bprm_set_creds() local
351 if (error) in apparmor_bprm_set_creds()
352 return error; in apparmor_bprm_set_creds()
369 error = aa_path_name(&bprm->file->f_path, profile->path_flags, &buffer, in apparmor_bprm_set_creds()
371 if (error) { in apparmor_bprm_set_creds()
374 error = 0; in apparmor_bprm_set_creds()
438 error = -ENOENT; in apparmor_bprm_set_creds()
448 error = -ENOMEM; in apparmor_bprm_set_creds()
451 error = -EACCES; in apparmor_bprm_set_creds()
457 error = -EACCES; in apparmor_bprm_set_creds()
465 error = -EPERM; in apparmor_bprm_set_creds()
478 error = may_change_ptraced_domain(new_profile); in apparmor_bprm_set_creds()
479 if (error) { in apparmor_bprm_set_creds()
516 error = aa_audit_file(profile, &perms, GFP_KERNEL, OP_EXEC, MAY_EXEC, in apparmor_bprm_set_creds()
517 name, target, cond.uid, info, error); in apparmor_bprm_set_creds()
523 return error; in apparmor_bprm_set_creds()
617 int error = 0; in aa_change_hat() local
635 error = -EPERM; in aa_change_hat()
654 error = -ECHILD; in aa_change_hat()
656 error = -ENOENT; in aa_change_hat()
678 error = -ENOMEM; in aa_change_hat()
686 error = -EPERM; in aa_change_hat()
691 error = may_change_ptraced_domain(hat); in aa_change_hat()
692 if (error) { in aa_change_hat()
694 error = -EPERM; in aa_change_hat()
699 error = aa_set_current_hat(hat, token); in aa_change_hat()
700 if (error == -EACCES) in aa_change_hat()
703 else if (name && !error) in aa_change_hat()
705 error = -ENOENT; in aa_change_hat()
712 error = aa_restore_previous_profile(token); in aa_change_hat()
720 error = aa_audit_file(profile, &perms, GFP_KERNEL, in aa_change_hat()
722 target, GLOBAL_ROOT_UID, info, error); in aa_change_hat()
729 return error; in aa_change_hat()
755 int op, error = 0; in aa_change_profile() local
791 error = -ENOENT; in aa_change_profile()
809 error = -EACCES; in aa_change_profile()
817 error = -ENOENT; in aa_change_profile()
824 error = -ENOMEM; in aa_change_profile()
830 error = may_change_ptraced_domain(target); in aa_change_profile()
831 if (error) { in aa_change_profile()
840 error = aa_set_current_onexec(target); in aa_change_profile()
842 error = aa_replace_current_profile(target); in aa_change_profile()
846 error = aa_audit_file(profile, &perms, GFP_KERNEL, op, request, in aa_change_profile()
847 name, hname, GLOBAL_ROOT_UID, info, error); in aa_change_profile()
853 return error; in aa_change_profile()