crypto: user - Allow get request with empty driver name
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 20 Nov 2014 04:44:32 +0000 (12:44 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 24 Nov 2014 14:41:52 +0000 (22:41 +0800)
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>
crypto/crypto_user.c

index e2a34fe..0bb30ac 100644 (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;