Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 171176
b: refs/heads/master
c: c84b326
h: refs/heads/master
v: v3
  • Loading branch information
Eric Paris authored and David S. Miller committed Nov 6, 2009
1 parent a4f62b0 commit a927b69
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3f378b684453f2a028eda463ce383370545d9cc9
refs/heads/master: c84b3268da3b85c9d8a9e504e1001a14ed829e94
2 changes: 1 addition & 1 deletion trunk/net/bluetooth/l2cap.c
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,7 @@ static int l2cap_sock_create(struct net *net, struct socket *sock, int protocol,
sock->type != SOCK_DGRAM && sock->type != SOCK_RAW)
return -ESOCKTNOSUPPORT;

if (sock->type == SOCK_RAW && !capable(CAP_NET_RAW))
if (sock->type == SOCK_RAW && !kern && !capable(CAP_NET_RAW))
return -EPERM;

sock->ops = &l2cap_sock_ops;
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv4/af_inet.c
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ static int inet_create(struct net *net, struct socket *sock, int protocol,
}

err = -EPERM;
if (sock->type == SOCK_RAW && !capable(CAP_NET_RAW))
if (sock->type == SOCK_RAW && !kern && !capable(CAP_NET_RAW))
goto out_rcu_unlock;

err = -EAFNOSUPPORT;
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv6/af_inet6.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ static int inet6_create(struct net *net, struct socket *sock, int protocol,
}

err = -EPERM;
if (sock->type == SOCK_RAW && !capable(CAP_NET_RAW))
if (sock->type == SOCK_RAW && !kern && !capable(CAP_NET_RAW))
goto out_rcu_unlock;

sock->ops = answer->ops;
Expand Down

0 comments on commit a927b69

Please sign in to comment.