openwrtv4/package/network/services/dropbear/patches/600-allow-blank-root-password.patch
Steven Barth d196b1fc2e Disable telnet in favor of passwordless SSH
This enables passworldless login for root via SSH whenever no root
password is set (e.g. after reset, flashing without keeping config
or in failsafe) and removes telnet support alltogether.

Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 46809
2015-09-07 19:29:25 +00:00

11 lines
441 B
Diff

--- a/svr-auth.c
+++ b/svr-auth.c
@@ -149,7 +149,7 @@ void recv_msg_userauth_request() {
AUTH_METHOD_NONE_LEN) == 0) {
TRACE(("recv_msg_userauth_request: 'none' request"))
if (valid_user
- && svr_opts.allowblankpass
+ && (svr_opts.allowblankpass || !strcmp(ses.authstate.pw_name, "root"))
&& !svr_opts.noauthpass
&& !(svr_opts.norootpass && ses.authstate.pw_uid == 0)
&& ses.authstate.pw_passwd[0] == '\0')