Setting tag linux-2.6-32-36
[linux-2.6.git] / linux-2.6-640-netlink-audit-hack.patch
1 From 8c48fbeaf216b37de60db872f9950404fa0b3f3b Mon Sep 17 00:00:00 2001
2 From: S.Çağlar Onur <caglar@cs.princeton.edu>
3 Date: Tue, 7 Dec 2010 11:10:01 -0500
4 Subject: [PATCH] linux-2.6-640-netlink-audit-hack.patch
5
6 ---
7  net/netlink/af_netlink.c |    5 +++++
8  1 files changed, 5 insertions(+), 0 deletions(-)
9
10 diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
11 index 1438a1d..ce66270 100644
12 --- a/net/netlink/af_netlink.c
13 +++ b/net/netlink/af_netlink.c
14 @@ -447,6 +447,11 @@ static int netlink_create(struct net *net, struct socket *sock, int protocol,
15         if (protocol < 0 || protocol >= MAX_LINKS)
16                 return -EPROTONOSUPPORT;
17  
18 +#ifndef CONFIG_AUDIT
19 +       if (protocol == NETLINK_AUDIT)
20 +               return -EPROTONOSUPPORT;
21 +#endif
22 +
23         netlink_lock_table();
24  #ifdef CONFIG_MODULES
25         if (!nl_table[protocol].registered) {
26 -- 
27 1.5.4.3
28