comparison svr-auth.c @ 119:3394a7cb30cd private-rez

propagate of 08347df3bca787bd3621602fe2b466c85c9dc3e2 and 717950f4061f1123659ee87c7c168805af920ab7 from branch 'matt.dbclient.rez' to 'matt.dbclient.authpam'
author Matt Johnston <matt@ucc.asn.au>
date Sun, 12 Sep 2004 05:52:36 +0000
parents 5312ca05ed48
children 9337c9f9a607
comparison
equal deleted inserted replaced
118:5312ca05ed48 119:3394a7cb30cd
53 53
54 memset(&ses.authstate, 0, sizeof(ses.authstate)); 54 memset(&ses.authstate, 0, sizeof(ses.authstate));
55 #ifdef ENABLE_SVR_PUBKEY_AUTH 55 #ifdef ENABLE_SVR_PUBKEY_AUTH
56 ses.authstate.authtypes |= AUTH_TYPE_PUBKEY; 56 ses.authstate.authtypes |= AUTH_TYPE_PUBKEY;
57 #endif 57 #endif
58 #if defined(DROPBEAR_PASSWORD_AUTH) || defined(DROPBEAR_PAM_AUTH) 58 #if defined(ENABLE_SVR_PUBKEY_AUTH) || defined(ENABLE_SVR_PAM_AUTH)
59 #ifdef ENABLE_SVR_PASSWORD_AUTH
60 if (!svr_opts.noauthpass) { 59 if (!svr_opts.noauthpass) {
61 ses.authstate.authtypes |= AUTH_TYPE_PASSWORD; 60 ses.authstate.authtypes |= AUTH_TYPE_PASSWORD;
62 } 61 }
63 #endif 62 #endif
64 63
153 goto out; 152 goto out;
154 } 153 }
155 } 154 }
156 #endif 155 #endif
157 156
158 #ifdef DROPBEAR_PAM_AUTH 157 #ifdef ENABLE_SVR_PAM_AUTH
159 if (!svr_opts.noauthpass && 158 if (!svr_opts.noauthpass &&
160 !(svr_opts.norootpass && ses.authstate.pw->pw_uid == 0) ) { 159 !(svr_opts.norootpass && ses.authstate.pw->pw_uid == 0) ) {
161 /* user wants to try password auth */ 160 /* user wants to try password auth */
162 if (methodlen == AUTH_METHOD_PASSWORD_LEN && 161 if (methodlen == AUTH_METHOD_PASSWORD_LEN &&
163 strncmp(methodname, AUTH_METHOD_PASSWORD, 162 strncmp(methodname, AUTH_METHOD_PASSWORD,