busybox: ensure SHA passwords are supported if used
authorPeter Korsgaard <peter@korsgaard.com>
Tue, 11 Feb 2014 13:59:16 +0000 (14:59 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Tue, 11 Feb 2014 13:59:16 +0000 (14:59 +0100)
As reported on IRC, our default busybox configuration doesn't support SHA
encoded passwords, breaking login if enabled under system configuration.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/busybox/busybox.mk

index 948f3e42d349b78015c80e665f5eb6438af58b00..2a8e61646147dbe23675c3ec97bd7e91fc499317 100644 (file)
@@ -75,6 +75,13 @@ define BUSYBOX_SET_MDEV
 endef
 endif
 
+# sha passwords need USE_BB_CRYPT_SHA
+ifeq ($(BR2_TARGET_GENERIC_PASSWD_SHA256)$(BR2_TARGET_GENERIC_PASSWD_SHA512),y)
+define BUSYBOX_SET_CRYPT_SHA
+       $(call KCONFIG_ENABLE_OPT,CONFIG_USE_BB_CRYPT_SHA,$(BUSYBOX_BUILD_CONFIG))
+endef
+endif
+
 ifeq ($(BR2_USE_MMU),y)
 define BUSYBOX_SET_MMU
        $(call KCONFIG_DISABLE_OPT,CONFIG_NOMMU,$(BUSYBOX_BUILD_CONFIG))
@@ -182,6 +189,7 @@ define BUSYBOX_CONFIGURE_CMDS
        $(BUSYBOX_SET_IPV6)
        $(BUSYBOX_PREFER_STATIC)
        $(BUSYBOX_SET_MDEV)
+       $(BUSYBOX_SET_CRYPT_SHA)
        $(BUSYBOX_NETKITBASE)
        $(BUSYBOX_NETKITTELNET)
        $(BUSYBOX_INTERNAL_SHADOW_PASSWORDS)