shadow: don't compile bcrypt for unsupported platforms
authorRosen Penev <redacted>
Tue, 16 Jun 2020 22:23:17 +0000 (15:23 -0700)
committerRosen Penev <redacted>
Tue, 16 Jun 2020 22:23:17 +0000 (15:23 -0700)
commit4e8b1887600ac3431957c98071a863dfc14684e7
tree2bbf5a7b8aacfe8aa7ebc73b647e0d493401cd92
parentf30d021087df90e9ed2f5c75076cf06a1a78d781
shadow: don't compile bcrypt for unsupported platforms

If musl has no bcrypt:

passwd: failed to crypt password with salt '$2a$13$w8EJ0Yfz5bGsG4U/0m7bk/': Function not implemented
The password for root is unchanged.

glibc output as it has no bcrypt:

passwd: failed to crypt password with salt '$2a$13$xbpmAYmq6Q/rZN5jOlNxJZ': Invalid argument
The password for root is unchanged.

--without-bcrypt output:

Invalid ENCRYPT_METHOD value: 'BCRYPT'.
Defaulting to DES.
passwd: password changed.

The solution was tested on glibc despite using a musl specific variable
Still works.

Signed-off-by: Rosen Penev <redacted>
utils/shadow/Makefile
git clone https://git.99rst.org/PROJECT