[PATCH] filterkey: add errormsg reporting

Richard Guy Briggs rgb at redhat.com
Tue Apr 4 10:38:41 UTC 2017


Call errormsg after processing filterkey to speed up debugging.

See: https://github.com/linux-audit/audit-userspace/issues/13

Signed-off-by: Richard Guy Briggs <rgb at redhat.com>
---
 src/auditctl.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/auditctl.c b/src/auditctl.c
index e112b16..04765f4 100644
--- a/src/auditctl.c
+++ b/src/auditctl.c
@@ -1091,8 +1091,10 @@ process_keys:
 	} else {
 		/* Add this to the rule */
 		int ret = audit_rule_fieldpair_data(&rule_new, cmd, flags);
-		if (ret < 0)
+		if (ret != 0) {
+			audit_number_to_errmsg(ret, cmd);
 			retval = -1;
+		}
 		free(cmd);
 	}
     }
-- 
1.7.1




More information about the Linux-audit mailing list