]> err.no Git - linux-2.6/blobdiff - security/selinux/netlink.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-kgdb
[linux-2.6] / security / selinux / netlink.c
index 20f481015db4639af428f0ac17f87910cc5805a6..6214a7a7314967ac99b4710942897dc1c0b0edaa 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;
        
@@ -88,7 +89,7 @@ out:
 nlmsg_failure:
        kfree_skb(skb);
 oom:
-       printk(KERN_ERR "SELinux:  OOM in %s\n", __FUNCTION__);
+       printk(KERN_ERR "SELinux:  OOM in %s\n", __func__);
        goto out;
 }
 
@@ -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);