[PATCH] Prevent per,success and exit fields from disappearing in syscall audit log

Paul Davies C pauldaviesc at gmail.com
Mon Jan 20 13:20:43 UTC 2014


This patch prevents the per, success and the exit fields from disappearing
from the audit system call log.

Signed-off-by: Paul Davies C <pauldaviesc at gmail.com>
---
 kernel/auditsc.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index 9845cb3..3871466 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -1300,10 +1300,14 @@ static void audit_log_exit(struct audit_context *context, struct task_struct *ts
 			 context->arch, context->major);
 	if (context->personality != PER_LINUX)
 		audit_log_format(ab, " per=%lx", context->personality);
+	else
+		audit_log_format(ab, " per=(null)");
 	if (context->return_valid)
 		audit_log_format(ab, " success=%s exit=%ld",
 				 (context->return_valid==AUDITSC_SUCCESS)?"yes":"no",
 				 context->return_code);
+	else
+		audit_log_format(ab, " success=(null) exit=(null)");
 
 	audit_log_format(ab,
 			 " a0=%lx a1=%lx a2=%lx a3=%lx items=%d",
-- 
1.7.9.5




More information about the Linux-audit mailing list