[systemd-devel] [PATCH] Report aa_change_onexec error code
Tom Gundersen
teg at jklm.no
Sat Oct 11 03:08:33 PDT 2014
Applied. Thanks!
Tom
On Sat, Oct 11, 2014 at 10:13 AM, <misc at zarb.org> wrote:
> From: Michael Scherer <misc at zarb.org>
>
> 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
> ---
> src/core/execute.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/core/execute.c b/src/core/execute.c
> index 8b9bb27..b165b33 100644
> --- a/src/core/execute.c
> +++ b/src/core/execute.c
> @@ -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
> --
> 1.8.3.1
>
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
More information about the systemd-devel
mailing list