[systemd-devel] [PATCH] selinux-access:log_callback() increase buffer for audit logging
harald at redhat.com
harald at redhat.com
Wed Feb 13 08:08:25 PST 2013
From: Harald Hoyer <harald at redhat.com>
As per https://bugzilla.redhat.com/show_bug.cgi?id=883043#c5
we can increase the buffer used with audit_log_user_avc_message() safely
to 4096 bytes.
---
src/core/selinux-access.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/core/selinux-access.c b/src/core/selinux-access.c
index 08a4834..363673a 100644
--- a/src/core/selinux-access.c
+++ b/src/core/selinux-access.c
@@ -181,7 +181,7 @@ static int log_callback(int type, const char *fmt, ...) {
#ifdef HAVE_AUDIT
if (get_audit_fd() >= 0) {
- char buf[LINE_MAX];
+ char buf[4096];
vsnprintf(buf, sizeof(buf), fmt, ap);
audit_log_user_avc_message(get_audit_fd(), AUDIT_USER_AVC, buf, NULL, NULL, NULL, 0);
--
1.8.1
More information about the systemd-devel
mailing list