aboutsummaryrefslogtreecommitdiffstats
path: root/net/key
diff options
context:
space:
mode:
Diffstat (limited to 'net/key')
-rw-r--r--net/key/af_key.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/key/af_key.c b/net/key/af_key.c
index 08897a3c7ec7..5b426a646544 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -141,7 +141,7 @@ static int pfkey_create(struct net *net, struct socket *sock, int protocol,
141 struct sock *sk; 141 struct sock *sk;
142 int err; 142 int err;
143 143
144 if (!capable(CAP_NET_ADMIN)) 144 if (!ns_capable(net->user_ns, CAP_NET_ADMIN))
145 return -EPERM; 145 return -EPERM;
146 if (sock->type != SOCK_RAW) 146 if (sock->type != SOCK_RAW)
147 return -ESOCKTNOSUPPORT; 147 return -ESOCKTNOSUPPORT;