Report aa_change_onexec error code
Since aa_change_onexec return the error code in errno, and return -1, the current code do not give any useful information when something fail. This make apparmor easier to debug, as seen on https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=760526
This commit is contained in:
committed by
Tom Gundersen
parent
547e849b72
commit
5482192e57
+1
-1
@@ -1698,7 +1698,7 @@ static int exec_child(ExecCommand *command,
|
||||
err = aa_change_onexec(context->apparmor_profile);
|
||||
if (err < 0 && !context->apparmor_profile_ignore) {
|
||||
*error = EXIT_APPARMOR_PROFILE;
|
||||
return err;
|
||||
return -errno;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user