From: Steve Grubb <sgrubb@redhat.com>
To: linux-audit@redhat.com
Subject: Re: patch suggested by rgb for fixing auditd logs for clone syscall shows exit code as container namespace pid of child process instead of host namespace
Date: Fri, 05 Jan 2018 13:07:16 -0500 [thread overview]
Message-ID: <1914895.SJHJx90rDh@x2> (raw)
In-Reply-To: <CAEcbJGGy33yx5rjeo+nrJJKLy-fUvpB+u55ptDw-oQYdrrVc3w@mail.gmail.com>
On Friday, January 5, 2018 6:00:01 AM EST madz car wrote:
> Hi Guys,
>
> Please refer to the issue details at github :
> https://github.com/linux-audit/audit-kernel/issues/68
>
> Here is a patch as suggested by rgb, i can confirm that it works.
By hooking this function, doesn't this change the return code for all
syscalls?
-Steve
> diff --git a/kernel/auditsc.c b/kernel/auditsc.c
> index ecc23e2..9a78ecb 100644
> --- a/kernel/auditsc.c
> +++ b/kernel/auditsc.c
> @@ -1557,6 +1557,11 @@ void __audit_syscall_exit(int success, long
> return_code)
> {
> struct task_struct *tsk = current;
> struct audit_context *context;
> +
> + rcu_read_lock();
> + return_code = pid_nr(find_vpid((int) return_code));
> + rcu_read_unlock();
> +
>
> if (success)
> success = AUDITSC_SUCCESS;
>
>
> Kindly review.
>
> Regards,
> Madzcar
next prev parent reply other threads:[~2018-01-05 18:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-05 11:00 patch suggested by rgb for fixing auditd logs for clone syscall shows exit code as container namespace pid of child process instead of host namespace madz car
2018-01-05 18:07 ` Steve Grubb [this message]
2018-01-08 12:53 ` Richard Guy Briggs
2018-01-08 17:49 ` madz car
2018-01-08 19:03 ` Steve Grubb
2018-01-09 6:01 ` Richard Guy Briggs
2018-01-09 9:54 ` Richard Guy Briggs
2018-01-10 16:19 ` Paul Moore
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1914895.SJHJx90rDh@x2 \
--to=sgrubb@redhat.com \
--cc=linux-audit@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox