=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/monitor.c,v retrieving revision 1.118 retrieving revision 1.119 diff -u -r1.118 -r1.119 --- src/usr.bin/ssh/monitor.c 2012/11/04 11:09:15 1.118 +++ src/usr.bin/ssh/monitor.c 2012/12/02 20:34:10 1.119 @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor.c,v 1.118 2012/11/04 11:09:15 djm Exp $ */ +/* $OpenBSD: monitor.c,v 1.119 2012/12/02 20:34:10 djm Exp $ */ /* * Copyright 2002 Niels Provos * Copyright 2002 Markus Friedl @@ -163,6 +163,7 @@ static char *hostbased_cuser = NULL; static char *hostbased_chost = NULL; static char *auth_method = "unknown"; +static char *auth_submethod = NULL; static u_int session_id2_len = 0; static u_char *session_id2 = NULL; static pid_t monitor_child_pid; @@ -274,7 +275,7 @@ monitor_child_preauth(Authctxt *_authctxt, struct monitor *pmonitor) { struct mon_table *ent; - int authenticated = 0; + int authenticated = 0, partial = 0; debug3("preauth child monitor started"); @@ -299,7 +300,9 @@ /* The first few requests do not require asynchronous access */ while (!authenticated) { + partial = 0; auth_method = "unknown"; + auth_submethod = NULL; authenticated = (monitor_read(pmonitor, mon_dispatch, &ent) == 1); /* Special handling for multiple required authentications */ @@ -313,6 +316,7 @@ debug3("%s: method %s: partial", __func__, auth_method); authenticated = 0; + partial = 1; } } @@ -325,7 +329,8 @@ authenticated = 0; } if (ent->flags & (MON_AUTHDECIDE|MON_ALOG)) { - auth_log(authctxt, authenticated, auth_method, + auth_log(authctxt, authenticated, partial, + auth_method, auth_submethod, compat20 ? " ssh2" : ""); if (!authenticated) authctxt->failures++; @@ -844,7 +849,7 @@ mm_request_send(sock, MONITOR_ANS_BSDAUTHRESPOND, m); if (compat20) - auth_method = "keyboard-interactive"; + auth_method = "keyboard-interactive"; /* XXX auth_submethod */ else auth_method = "bsdauth"; @@ -920,7 +925,8 @@ hostbased_chost = chost; } else { /* Log failed attempt */ - auth_log(authctxt, 0, auth_method, compat20 ? " ssh2" : ""); + auth_log(authctxt, 0, 0, auth_method, NULL, + compat20 ? " ssh2" : ""); xfree(blob); xfree(cuser); xfree(chost);