Mike Gilbert 234e8fa7b1 libmisc: fix default value in SHA_get_salt_rounds()
If SHA_CRYPT_MIN_ROUNDS and SHA_CRYPT_MAX_ROUNDS are both unspecified,
use SHA_ROUNDS_DEFAULT.

Previously, the code fell through, calling shadow_random(-1, -1). This
ultimately set rounds = (unsigned long) -1, which ends up being a very
large number! This then got capped to SHA_ROUNDS_MAX later in the
function.

The new behavior matches BCRYPT_get_salt_rounds().

Bug: https://bugs.gentoo.org/808195
Fixes: https://github.com/shadow-maint/shadow/issues/393
2021-08-14 13:43:26 -04:00
..
2021-06-24 09:18:35 +02:00
2011-09-18 21:02:43 +00:00
2020-01-12 07:31:26 -06:00
2008-05-25 23:31:10 +00:00
2021-06-24 09:18:35 +02:00
2021-06-24 09:18:35 +02:00
2021-06-16 09:50:53 +02:00
2017-10-22 18:33:13 +00:00
2017-10-22 19:17:02 +00:00
2021-06-24 09:18:35 +02:00
2021-04-16 21:02:37 -05:00
2021-07-14 12:13:25 +02:00
2021-06-16 09:50:53 +02:00
2021-06-24 09:18:35 +02:00
2021-02-01 22:11:10 +01:00
2010-08-22 13:04:54 +00:00
2017-10-22 18:33:13 +00:00
2013-08-04 15:56:32 +02:00
2010-08-22 13:04:54 +00:00
2010-08-22 13:04:54 +00:00
2021-06-24 09:18:35 +02:00
2021-06-16 09:50:53 +02:00