]> Pileus Git - ~andy/linux/blobdiff - net/packet/af_packet.c
Merge tag 'fbdev-for-3.8' of git://gitorious.org/linux-omap-dss2/linux
[~andy/linux] / net / packet / af_packet.c
index f262dbfc7f0684c34f44bc39ea7615aa8e82e3f7..e639645e8fec8ca365c8fc1bc4fb3650db04b5f4 100644 (file)
@@ -2504,7 +2504,7 @@ static int packet_create(struct net *net, struct socket *sock, int protocol,
        __be16 proto = (__force __be16)protocol; /* weird, but documented */
        int err;
 
-       if (!capable(CAP_NET_RAW))
+       if (!ns_capable(net->user_ns, CAP_NET_RAW))
                return -EPERM;
        if (sock->type != SOCK_DGRAM && sock->type != SOCK_RAW &&
            sock->type != SOCK_PACKET)