0004-busybox-enable-telnet-only-when-root-password-is-really-empty-not-when-it-is-locked.patch 903 B

1234567891011121314151617181920212223242526
  1. From: Matthias Schiffer <mschiffer@universe-factory.net>
  2. Date: Fri, 5 Dec 2014 18:57:16 +0100
  3. Subject: busybox: enable telnet only when root password is really empty, not when it is locked
  4. diff --git a/package/utils/busybox/files/telnet b/package/utils/busybox/files/telnet
  5. index a1d1cdf..f95be90 100755
  6. --- a/package/utils/busybox/files/telnet
  7. +++ b/package/utils/busybox/files/telnet
  8. @@ -11,7 +11,7 @@ has_root_pwd() {
  9. pwd="${pwd#*root:}"
  10. pwd="${pwd%%:*}"
  11. - test -n "${pwd#[\!x]}"
  12. + test -n "${pwd}"
  13. }
  14. get_root_home() {
  15. @@ -28,7 +28,7 @@ has_ssh_pubkey() {
  16. start_service() {
  17. if ( ! has_ssh_pubkey && \
  18. - ! has_root_pwd /etc/passwd && ! has_root_pwd /etc/shadow ) || \
  19. + ( ! has_root_pwd /etc/passwd || ! has_root_pwd /etc/shadow ) ) || \
  20. ( ! /etc/init.d/dropbear enabled 2> /dev/null && ! /etc/init.d/sshd enabled 2> /dev/null );
  21. then
  22. procd_open_instance