Home | History | Annotate | Download | only in dropbear

Lines Matching refs:authstate

44 	ses.authstate.failcount = 0;
54 memset(&ses.authstate, 0, sizeof(ses.authstate));
56 ses.authstate.authtypes |= AUTH_TYPE_PUBKEY;
60 ses.authstate.authtypes |= AUTH_TYPE_PASSWORD;
100 if (ses.authstate.authdone == 1) {
146 !(svr_opts.norootpass && ses.authstate.pw->pw_uid == 0) ) {
159 !(svr_opts.norootpass && ses.authstate.pw->pw_uid == 0) ) {
204 if (ses.authstate.username == NULL ||
205 strcmp(username, ses.authstate.username) != 0) {
207 if (ses.authstate.username != NULL) {
210 m_free(ses.authstate.username);
213 ses.authstate.pw = getpwnam((char*)username);
214 ses.authstate.username = m_strdup(username);
215 m_free(ses.authstate.printableuser);
219 if (ses.authstate.pw == NULL) {
229 ses.authstate.printableuser = m_strdup(ses.authstate.pw->pw_name);
232 if (svr_opts.norootlogin && ses.authstate.pw->pw_uid == 0) {
240 if (ses.authstate.pw->pw_passwd[0] == '\0') {
243 ses.authstate.printableuser);
248 TRACE(("shell is %s", ses.authstate.pw->pw_shell))
251 usershell = ses.authstate.pw->pw_shell;
272 ses.authstate.printableuser);
280 TRACE(("uid = %d", ses.authstate.pw->pw_uid))
304 if (ses.authstate.authtypes & AUTH_TYPE_PUBKEY) {
306 if (ses.authstate.authtypes & AUTH_TYPE_PASSWORD) {
311 if (ses.authstate.authtypes & AUTH_TYPE_PASSWORD) {
319 TRACE(("auth fail: methods %d, '%s'", ses.authstate.authtypes,
329 ses.authstate.failcount++;
332 if (ses.authstate.failcount >= MAX_AUTH_TRIES) {
337 if (ses.authstate.printableuser == NULL) {
340 userstr = ses.authstate.printableuser;
359 ses.authstate.authdone = 1;
363 if (ses.authstate.pw->pw_uid == 0) {