crypto: user - Allow get request with empty driver name

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>
This commit is contained in:
Herbert Xu 2014-11-20 12:44:32 +08:00
parent 3e16d322f2
commit 5d4a5e770d
1 changed files with 1 additions and 4 deletions

View File

@ -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;