]> err.no Git - linux-2.6/blobdiff - security/selinux/netlink.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-linus
[linux-2.6] / security / selinux / netlink.c
index 0f7be6524555f314c545a5a9fb9163ee81fe65e8..b59871d74dad870e72d13ee48f0dab4b3e95bcde 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/skbuff.h>
 #include <linux/netlink.h>
 #include <linux/selinux_netlink.h>
+#include <net/net_namespace.h>
 
 static struct sock *selnl;
 
@@ -66,7 +67,7 @@ static void selnl_add_payload(struct nlmsghdr *nlh, int len, int msgtype, void *
 static void selnl_notify(int msgtype, void *data)
 {
        int len;
-       unsigned char *tmp;
+       sk_buff_data_t tmp;
        struct sk_buff *skb;
        struct nlmsghdr *nlh;
        
@@ -80,8 +81,8 @@ static void selnl_notify(int msgtype, void *data)
        nlh = NLMSG_PUT(skb, 0, 0, msgtype, len);
        selnl_add_payload(nlh, len, msgtype, data);
        nlh->nlmsg_len = skb->tail - tmp;
-       NETLINK_CB(skb).dst_groups = SELNL_GRP_AVC;
-       netlink_broadcast(selnl, skb, 0, SELNL_GRP_AVC, GFP_USER);
+       NETLINK_CB(skb).dst_group = SELNLGRP_AVC;
+       netlink_broadcast(selnl, skb, 0, SELNLGRP_AVC, GFP_USER);
 out:
        return;
        
@@ -104,7 +105,8 @@ void selnl_notify_policyload(u32 seqno)
 
 static int __init selnl_init(void)
 {
-       selnl = netlink_kernel_create(NETLINK_SELINUX, NULL, THIS_MODULE);
+       selnl = netlink_kernel_create(&init_net, NETLINK_SELINUX,
+                                     SELNLGRP_MAX, NULL, NULL, THIS_MODULE);
        if (selnl == NULL)
                panic("SELinux:  Cannot create netlink socket.");
        netlink_set_nonroot(NETLINK_SELINUX, NL_NONROOT_RECV);