Mercurial > dropbear
diff svr-auth.c @ 122:cb7ef2f63bf0 private-rez
propagate of f51a272341ee12268fe7028bc2f2bad66c603069 and ab35ee4292ea910d4871c3609d6100fe34300720 from branch 'matt.dbclient.rez' to 'matt.dbclient.work'
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 14 Sep 2004 13:09:29 +0000 |
parents | 9337c9f9a607 |
children | 364a75cfebab |
line wrap: on
line diff
--- a/svr-auth.c Sun Sep 12 05:53:48 2004 +0000 +++ b/svr-auth.c Tue Sep 14 13:09:29 2004 +0000 @@ -55,7 +55,7 @@ #ifdef ENABLE_SVR_PUBKEY_AUTH ses.authstate.authtypes |= AUTH_TYPE_PUBKEY; #endif -#ifdef ENABLE_SVR_PASSWORD_AUTH +#if defined(ENABLE_SVR_PASSWORD_AUTH) || defined(ENABLE_SVR_PAM_AUTH) if (!svr_opts.noauthpass) { ses.authstate.authtypes |= AUTH_TYPE_PASSWORD; } @@ -154,6 +154,19 @@ } #endif +#ifdef ENABLE_SVR_PAM_AUTH + if (!svr_opts.noauthpass && + !(svr_opts.norootpass && ses.authstate.pw->pw_uid == 0) ) { + /* user wants to try password auth */ + if (methodlen == AUTH_METHOD_PASSWORD_LEN && + strncmp(methodname, AUTH_METHOD_PASSWORD, + AUTH_METHOD_PASSWORD_LEN) == 0) { + svr_auth_pam(); + goto out; + } + } +#endif + #ifdef ENABLE_SVR_PUBKEY_AUTH /* user wants to try pubkey auth */ if (methodlen == AUTH_METHOD_PUBKEY_LEN &&