=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/auth2-chall.c,v retrieving revision 1.20 retrieving revision 1.20.8.2 diff -u -r1.20 -r1.20.8.2 --- src/usr.bin/ssh/auth2-chall.c 2002/06/30 21:59:45 1.20 +++ src/usr.bin/ssh/auth2-chall.c 2005/03/10 17:15:04 1.20.8.2 @@ -23,7 +23,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "includes.h" -RCSID("$OpenBSD: auth2-chall.c,v 1.20 2002/06/30 21:59:45 deraadt Exp $"); +RCSID("$OpenBSD: auth2-chall.c,v 1.20.8.2 2005/03/10 17:15:04 brad Exp $"); #include "ssh2.h" #include "auth.h" @@ -31,7 +31,6 @@ #include "packet.h" #include "xmalloc.h" #include "dispatch.h" -#include "auth.h" #include "log.h" static int auth2_challenge_start(Authctxt *); @@ -269,12 +268,7 @@ } packet_check_eom(); - if (authctxt->valid) { - res = kbdintctxt->device->respond(kbdintctxt->ctxt, - nresp, response); - } else { - res = -1; - } + res = kbdintctxt->device->respond(kbdintctxt->ctxt, nresp, response); for (i = 0; i < nresp; i++) { memset(response[i], 'r', strlen(response[i])); @@ -286,7 +280,7 @@ switch (res) { case 0: /* Success! */ - authenticated = 1; + authenticated = authctxt->valid ? 1 : 0; break; case 1: /* Authentication needs further interaction */