Browse Source

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 <rosenp@gmail.com>
lilik-openwrt-22.03
Rosen Penev 4 years ago
parent
commit
4e8b188760
No known key found for this signature in database GPG Key ID: 36D31CFA845F0E3B
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      utils/shadow/Makefile

+ 2
- 2
utils/shadow/Makefile View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=shadow PKG_NAME:=shadow
PKG_VERSION:=4.8.1 PKG_VERSION:=4.8.1
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://github.com/shadow-maint/shadow/releases/download/$(PKG_VERSION) PKG_SOURCE_URL:=https://github.com/shadow-maint/shadow/releases/download/$(PKG_VERSION)
@ -41,7 +41,7 @@ CONFIGURE_ARGS += \
--without-attr \ --without-attr \
--without-tcb \ --without-tcb \
--without-nscd \ --without-nscd \
--with-bcrypt
--with$(if $(CONFIG_MUSL_DISABLE_CRYPT_SIZE_HACK),,out)-bcrypt
CONFIGURE_VARS += \ CONFIGURE_VARS += \
ac_cv_func_ruserok=no ac_cv_func_ruserok=no


Loading…
Cancel
Save