summaryrefslogtreecommitdiffstats
path: root/crypto/crypto_user.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/crypto_user.c')
-rw-r--r--crypto/crypto_user.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/crypto/crypto_user.c b/crypto/crypto_user.c
index 3e61cc101e8..f76e42bcc6e 100644
--- a/crypto/crypto_user.c
+++ b/crypto/crypto_user.c
@@ -382,16 +382,20 @@ static int crypto_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
type -= CRYPTO_MSG_BASE;
link = &crypto_dispatch[type];
- if (security_netlink_recv(skb, CAP_NET_ADMIN))
+ if (!capable(CAP_NET_ADMIN))
return -EPERM;
if ((type == (CRYPTO_MSG_GETALG - CRYPTO_MSG_BASE) &&
(nlh->nlmsg_flags & NLM_F_DUMP))) {
if (link->dump == NULL)
return -EINVAL;
-
- return netlink_dump_start(crypto_nlsk, skb, nlh,
- link->dump, link->done, 0);
+ {
+ struct netlink_dump_control c = {
+ .dump = link->dump,
+ .done = link->done,
+ };
+ return netlink_dump_start(crypto_nlsk, skb, nlh, &c);
+ }
}
err = nlmsg_parse(nlh, crypto_msg_min[type], attrs, CRYPTOCFGA_MAX,