Skip to content

Commit

Permalink
crypto: user - Allow get request with empty driver name
Browse files Browse the repository at this point in the history
Currently all get requests with an empty driver name fail with
EINVAL.  Since most users actually want to supply an empty driver
name this patch removes this check.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
herbertx committed Nov 24, 2014
1 parent 3e16d32 commit 5d4a5e7
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions crypto/crypto_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,7 @@ static int crypto_report(struct sk_buff *in_skb, struct nlmsghdr *in_nlh,
if (!null_terminated(p->cru_name) || !null_terminated(p->cru_driver_name))
return -EINVAL;

if (!p->cru_driver_name[0])
return -EINVAL;

alg = crypto_alg_match(p, 1);
alg = crypto_alg_match(p, 0);
if (!alg)
return -ENOENT;

Expand Down

0 comments on commit 5d4a5e7

Please sign in to comment.