Changeset 29130


Ignore:
Timestamp:
2011-11-14T20:02:01+01:00 (6 years ago)
Author:
jow
Message:

[package] 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.

Location:
trunk/package/base-files
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/base-files/Makefile

    r28943 r29130  
    1111 
    1212PKG_NAME:=base-files 
    13 PKG_RELEASE:=93 
     13PKG_RELEASE:=94 
    1414 
    1515PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/ 
  • trunk/package/base-files/files/bin/login.sh

    r28943 r29130  
    22# Copyright (C) 2006-2011 OpenWrt.org 
    33 
    4 if grep -qs '^root:[^!:]' /etc/passwd /etc/shadow && [ -z "$FAILSAFE" ]; then 
     4if ( ! grep -qs '^root::' /etc/shadow || \ 
     5     ! grep -qs '^root:[!x]\?:' /etc/passwd ) && \ 
     6   [ -z "$FAILSAFE" ] 
     7then 
    58        echo "Login failed." 
    69        exit 0 
  • trunk/package/base-files/files/etc/passwd

    r28935 r29130  
    1 root::0:0:root:/root:/bin/ash 
     1root:x:0:0:root:/root:/bin/ash 
    22daemon:*:1:1:daemon:/var:/bin/false 
    33ftp:*:55:55:ftp:/home/ftp:/bin/false 
Note: See TracChangeset for help on using the changeset viewer.