Mercurial > dropbear
comparison common-session.c @ 705:2e573f39b88e
Android returns NULL for pw_crypt, set it to something else
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 19 Mar 2013 20:15:44 +0800 |
parents | 0edf08895a33 |
children | 78eda530c000 ac2158e3e403 |
comparison
equal
deleted
inserted
replaced
704:523be406edc4 | 705:2e573f39b88e |
---|---|
460 struct spwd *spasswd = getspnam(ses.authstate.pw_name); | 460 struct spwd *spasswd = getspnam(ses.authstate.pw_name); |
461 if (spasswd && spasswd->sp_pwdp) { | 461 if (spasswd && spasswd->sp_pwdp) { |
462 passwd_crypt = spasswd->sp_pwdp; | 462 passwd_crypt = spasswd->sp_pwdp; |
463 } | 463 } |
464 #endif | 464 #endif |
465 if (!passwd_crypt) { | |
466 /* android supposedly returns NULL */ | |
467 passwd_crypt = "!!"; | |
468 } | |
465 ses.authstate.pw_passwd = m_strdup(passwd_crypt); | 469 ses.authstate.pw_passwd = m_strdup(passwd_crypt); |
466 } | 470 } |
467 } | 471 } |
468 | 472 |