comparison svr-auth.c @ 677:55b84e59aaad

Fix empty password immediate login
author Matt Johnston <matt@ucc.asn.au>
date Wed, 09 May 2012 22:51:59 +0800
parents 0edf08895a33
children 6e0899b56ac4
comparison
equal deleted inserted replaced
676:0edf08895a33 677:55b84e59aaad
153 if (methodlen == AUTH_METHOD_NONE_LEN && 153 if (methodlen == AUTH_METHOD_NONE_LEN &&
154 strncmp(methodname, AUTH_METHOD_NONE, 154 strncmp(methodname, AUTH_METHOD_NONE,
155 AUTH_METHOD_NONE_LEN) == 0) { 155 AUTH_METHOD_NONE_LEN) == 0) {
156 TRACE(("recv_msg_userauth_request: 'none' request")) 156 TRACE(("recv_msg_userauth_request: 'none' request"))
157 #ifdef ALLOW_BLANK_PASSWORD 157 #ifdef ALLOW_BLANK_PASSWORD
158 TRACE(("pw_passwd '%s'", ses.authstate.pw_passwd))
158 if (!svr_opts.noauthpass 159 if (!svr_opts.noauthpass
159 && !(svr_opts.norootpass && ses.authstate.pw_uid == 0) 160 && !(svr_opts.norootpass && ses.authstate.pw_uid == 0)
160 && ses.authstate.pw_passwd == '\0') 161 && ses.authstate.pw_passwd[0] == '\0')
161 { 162 {
162 dropbear_log(LOG_NOTICE, 163 dropbear_log(LOG_NOTICE,
163 "Auth succeeded with blank password for '%s' from %s", 164 "Auth succeeded with blank password for '%s' from %s",
164 ses.authstate.pw_name, 165 ses.authstate.pw_name,
165 svr_ses.addrstring); 166 svr_ses.addrstring);