Allow dropbear to use shadow passwords, and correct base-files generation of /etc...
authorPeter Denison <openwrt@marshadder.org>
Tue, 30 Sep 2008 00:56:55 +0000 (00:56 +0000)
committerPeter Denison <openwrt@marshadder.org>
Tue, 30 Sep 2008 00:56:55 +0000 (00:56 +0000)
SVN-Revision: 12809

package/base-files/Makefile
package/dropbear/Makefile

index 9f745aa173d682efb34d71c653f003f951b07b9a..4f8569ec274c0b74b8eeb213c10f9913c19022e7 100644 (file)
@@ -146,7 +146,12 @@ define Package/base-files$(TARGET)/install
                        $(CP) $(PLATFORM_SUBDIR)/base-files-$(PROFILE)/* $(1)/; \
                fi \
        )
-       $(if $(CONFIG_BUSYBOX_CONFIG_FEATURE_SHADOWPASSWDS),cp $(1)/etc/passwd $(1)/etc/shadow)
+# Form valid /etc/shadow entries, by copying the user:pw pairs
+# from /etc/passwd, and adding on pw change data
+       $(if $(CONFIG_BUSYBOX_CONFIG_FEATURE_SHADOWPASSWDS), \
+               cut -d ':' -f 1-2 $(1)/etc/passwd > $(1)/etc/shadow; \
+               $(SED) 's/$$$$/:13848:0:99999:7:::/' $(1)/etc/shadow \
+       )
        $(SED) 's,$$$$R,$(REVISION),g' $(1)/etc/banner
        mkdir -p $(1)/dev
        mkdir -p $(1)/etc/crontabs
index 96eb5911d7a266d87ebceb853e6d09c47472bad5..a98c24aa2aa5dc59a88fa8e2acfef80bc1df9f3d 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dropbear
 PKG_VERSION:=0.51
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:= \
@@ -47,7 +47,7 @@ CONFIGURE_ARGS += \
        --disable-pam \
        --enable-openpty \
        --enable-syslog \
-       --disable-shadow \
+       $(if $(CONFIG_SHADOW_PASSWORDS),,--disable-shadow) \
        --disable-lastlog \
        --disable-utmp \
        --disable-utmpx \