Эх сурвалжийг харах

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>
Herbert Xu 10 жил өмнө
parent
commit
5d4a5e770d
1 өөрчлөгдсөн 1 нэмэгдсэн , 4 устгасан
  1. 1 4
      crypto/crypto_user.c

+ 1 - 4
crypto/crypto_user.c

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