All of lore.kernel.org
 help / color / mirror / Atom feed
* 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
@ 2018-01-05 11:00 madz car
  2018-01-05 18:07 ` Steve Grubb
  0 siblings, 1 reply; 8+ messages in thread
From: madz car @ 2018-01-05 11:00 UTC (permalink / raw)
  To: linux-audit


[-- Attachment #1.1: Type: text/plain, Size: 688 bytes --]

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.


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

[-- Attachment #1.2: Type: text/html, Size: 1163 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-01-10 16:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.