base-files: prime root password with "x" to notify programs that there is a shadow record, fix /bin/login.sh password detection accordingly. Solves broken key based dropbear login with empty password after r28935.
SVN-Revision: 29130
This commit is contained in:
parent
79a4642b40
commit
8b20bfafdf
@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
include $(INCLUDE_DIR)/kernel.mk
|
include $(INCLUDE_DIR)/kernel.mk
|
||||||
|
|
||||||
PKG_NAME:=base-files
|
PKG_NAME:=base-files
|
||||||
PKG_RELEASE:=93
|
PKG_RELEASE:=94
|
||||||
|
|
||||||
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
|
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
|
||||||
PKG_BUILD_DEPENDS:=opkg/host
|
PKG_BUILD_DEPENDS:=opkg/host
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Copyright (C) 2006-2011 OpenWrt.org
|
# Copyright (C) 2006-2011 OpenWrt.org
|
||||||
|
|
||||||
if grep -qs '^root:[^!:]' /etc/passwd /etc/shadow && [ -z "$FAILSAFE" ]; then
|
if ( ! grep -qs '^root::' /etc/shadow || \
|
||||||
|
! grep -qs '^root:[!x]\?:' /etc/passwd ) && \
|
||||||
|
[ -z "$FAILSAFE" ]
|
||||||
|
then
|
||||||
echo "Login failed."
|
echo "Login failed."
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
root::0:0:root:/root:/bin/ash
|
root:x:0:0:root:/root:/bin/ash
|
||||||
daemon:*:1:1:daemon:/var:/bin/false
|
daemon:*:1:1:daemon:/var:/bin/false
|
||||||
ftp:*:55:55:ftp:/home/ftp:/bin/false
|
ftp:*:55:55:ftp:/home/ftp:/bin/false
|
||||||
network:*:101:101:network:/var:/bin/false
|
network:*:101:101:network:/var:/bin/false
|
||||||
|
Loading…
Reference in New Issue
Block a user