Lines Matching defs:error
52 * @info: message if there is an error
57 * Returns: %0 or error if change not allowed
64 int error = 0;
76 error = aa_may_ptrace(tracerl, to_label, PTRACE_MODE_ATTACH);
82 if (error)
84 return error;
257 int error;
260 error = label_compound_match(profile, label, stack, state, subns,
262 if (!error)
263 return error;
307 * Returns: number of extended attributes that matched, or < 0 on error
375 * @info - info message if there was an error (NOT NULL)
600 /* no profile && no error */
632 int error = 0;
638 error = aa_path_name(&bprm->file->f_path, profile->path_flags, buffer,
640 if (error) {
643 AA_DEBUG("name lookup ix on error");
644 error = 0;
672 error = -EACCES;
684 error = -ENOMEM;
687 error = -EACCES;
693 error = -EACCES;
711 cond->uid, info, error);
714 return ERR_PTR(error);
728 int error = -EACCES;
745 error = aa_path_name(&bprm->file->f_path, profile->path_flags, buffer,
747 if (error) {
750 AA_DEBUG("name lookup ix on error");
751 error = 0;
768 error = change_profile_perms(profile, onexec, stack, AA_MAY_ONEXEC,
770 if (error) {
787 NULL, onexec, cond->uid, info, error);
800 int error;
808 error = fn_for_each_in_ns(label, profile,
811 if (error)
812 return ERR_PTR(error);
820 error = fn_for_each_in_ns(label, profile,
823 if (error)
824 return ERR_PTR(error);
836 error = fn_for_each_in_ns(label, profile,
841 return ERR_PTR(error);
848 * Returns: %0 or error on failure
859 int error = 0;
886 error = -ENOMEM;
901 error = PTR_ERR(new);
904 error = -ENOMEM;
919 error = -EPERM;
931 error = may_change_ptraced_domain(new, &info);
932 if (error)
964 return error;
967 error = fn_for_each(label, profile,
971 error));
990 int error = 0;
998 error = -EPERM;
1004 error = -ENOENT;
1010 error = -ENOMEM;
1020 error);
1021 if (!hat || (error && error != -ENOENT))
1022 return ERR_PTR(error);
1023 /* if hat && error - complain mode, already audited and we adjust for
1041 int i, error;
1060 error = -EPERM;
1071 error = -EPERM;
1082 /* no hats that match, find appropriate error
1092 error = -ENOENT;
1097 error = -ECHILD;
1111 GLOBAL_ROOT_UID, info, error);
1114 return ERR_PTR(error);
1122 error = -ENOMEM;
1124 } /* else if (IS_ERR) build_change_hat has logged error so return new */
1136 * Returns %0 on success, error otherwise.
1154 int error = 0;
1173 error = -EPERM;
1181 error = PTR_ERR(new);
1187 error = may_change_ptraced_domain(new, &info);
1188 if (error)
1199 error = -EPERM;
1207 error = aa_set_current_hat(new, token);
1208 if (error == -EACCES)
1220 error = -EPERM;
1228 error = aa_restore_previous_label(token);
1229 if (error) {
1230 if (error == -EACCES)
1242 return error;
1252 GLOBAL_ROOT_UID, info, error));
1264 int error = 0;
1266 if (!error)
1267 error = change_profile_perms(profile, target, stack, request,
1269 if (error)
1270 error = aa_audit_file(profile, perms, op, request, name,
1272 error);
1274 return error;
1289 * Returns %0 on success, error otherwise.
1300 int error = 0;
1346 error = PTR_ERR(target);
1360 error = -ENOMEM;
1375 error = fn_for_each_in_ns(label, profile,
1379 if (error)
1387 error = may_change_ptraced_domain(target, &info);
1388 if (error && !fn_for_each_in_ns(label, profile,
1395 * error = -EACCES;
1415 error = -EPERM;
1427 error = -ENOMEM;
1429 error = PTR_ERR(new);
1434 error = aa_replace_current_label(new);
1442 error = aa_set_current_onexec(target, stack);
1446 error = fn_for_each_in_ns(label, profile,
1449 GLOBAL_ROOT_UID, info, error));
1456 return error;