[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1359344718-3953-7-git-send-email-rbriggs@redhat.com>
Date: Sun, 27 Jan 2013 22:45:18 -0500
From: Richard Guy Briggs <rbriggs@...hat.com>
To: linux-kernel@...r.kernel.org
Cc: Richard Guy Briggs <rgb@...hat.com>,
Richard Guy Briggs <rbriggs@...hat.com>
Subject: [PATCH 6/6] audit: send multicast messages only if there are listeners
From: Richard Guy Briggs <rgb@...hat.com>
Test first to see if there are any userspace multicast listeners bound to the
socket before starting the multicast send work.
Signed-off-by: Richard Guy Briggs <rbriggs@...hat.com>
---
kernel/audit.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/audit.c b/kernel/audit.c
index 9eef05b..d153a6b 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -428,6 +428,8 @@ static void kauditd_send_multicast_skb(struct sk_buff *skb)
struct sk_buff *copy;
struct nlmsghdr *nlh;
+ if (!netlink_has_listeners(audit_sock, AUDIT_NLGRP_READLOG))
+ return;
/*
* The seemingly wasteful skb_copy() is necessary because the original
* kaudit unicast socket sends up messages with nlmsg_len set to the
--
1.8.0.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists