]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - net/netlink/af_netlink.c
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[mv-sheeva.git] / net / netlink / af_netlink.c
index 1d16d95dfaaf340ad02ce78d7c5e875fd2a4ec4d..46f3e44bb83a583bbacfc4d84765082aaee7f4e8 100644 (file)
@@ -54,7 +54,6 @@
 #include <linux/mm.h>
 #include <linux/types.h>
 #include <linux/audit.h>
-#include <linux/selinux.h>
 #include <linux/mutex.h>
 
 #include <net/net_namespace.h>
@@ -228,7 +227,7 @@ static inline struct sock *netlink_lookup(struct net *net, int protocol,
        read_lock(&nl_table_lock);
        head = nl_pid_hashfn(hash, pid);
        sk_for_each(sk, node, head) {
-               if (sock_net(sk) == net && (nlk_sk(sk)->pid == pid)) {
+               if (net_eq(sock_net(sk), net) && (nlk_sk(sk)->pid == pid)) {
                        sock_hold(sk);
                        goto found;
                }
@@ -348,7 +347,7 @@ static int netlink_insert(struct sock *sk, struct net *net, u32 pid)
        head = nl_pid_hashfn(hash, pid);
        len = 0;
        sk_for_each(osk, node, head) {
-               if (sock_net(osk) == net && (nlk_sk(osk)->pid == pid))
+               if (net_eq(sock_net(osk), net) && (nlk_sk(osk)->pid == pid))
                        break;
                len++;
        }
@@ -532,7 +531,7 @@ retry:
        netlink_table_grab();
        head = nl_pid_hashfn(hash, pid);
        sk_for_each(osk, node, head) {
-               if (sock_net(osk) != net)
+               if (!net_eq(sock_net(osk), net))
                        continue;
                if (nlk_sk(osk)->pid == pid) {
                        /* Bind collision, search negative pid values. */
@@ -962,7 +961,7 @@ static inline int do_one_broadcast(struct sock *sk,
            !test_bit(p->group - 1, nlk->groups))
                goto out;
 
-       if (sock_net(sk) != p->net)
+       if (!net_eq(sock_net(sk), p->net))
                goto out;
 
        if (p->failure) {
@@ -1249,7 +1248,7 @@ static int netlink_sendmsg(struct kiocb *kiocb, struct socket *sock,
        NETLINK_CB(skb).pid     = nlk->pid;
        NETLINK_CB(skb).dst_group = dst_group;
        NETLINK_CB(skb).loginuid = audit_get_loginuid(current);
-       selinux_get_task_sid(current, &(NETLINK_CB(skb).sid));
+       security_task_getsecid(current, &(NETLINK_CB(skb).sid));
        memcpy(NETLINK_CREDS(skb), &siocb->scm->creds, sizeof(struct ucred));
 
        /* What can I do? Netlink is asynchronous, so that