aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services/dropbear/patches/600-allow-blank-root-password.patch
blob: b138862ca31878e0b1cc042e7ea4aa2adf6437a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
--- a/svr-auth.c
+++ b/svr-auth.c
@@ -125,7 +125,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')