package/shadow: ensure that SHA support is enabled when requested

Ensure that the SHA_CRYPT option is enabled when the system configuration is
set to SHA256/512, as otherwise passwd complains when a password is changed:

passwd
...
Invalid ENCRYPT_METHOD value: 'SHA512'.
Defaulting to DES.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
(cherry picked from commit 7e72901eef)
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
This commit is contained in:
Peter Korsgaard
2026-02-04 14:56:37 +01:00
committed by Thomas Perale
parent 5c76442776
commit be7bd63d6e

View File

@@ -3,6 +3,9 @@ menuconfig BR2_PACKAGE_SHADOW
depends on !BR2_STATIC_LIBS
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14
select BR2_PACKAGE_LIBXCRYPT if BR2_TOOLCHAIN_USES_GLIBC
select BR2_PACKAGE_SHADOW_SHA_CRYPT if \
(BR2_TARGET_GENERIC_PASSWD_SHA256 || \
BR2_TARGET_GENERIC_PASSWD_SHA512)
help
Utilities to deal with user accounts.