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 e2a34feec7a4cf80199e651032c70eee8d94460b..0bb30ac3a323eb5e13825157c30af7f6601d0836 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;