summaryrefslogtreecommitdiff
path: root/auth2-chall.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2005-01-20 11:05:34 +1100
committerDarren Tucker <dtucker@zip.com.au>2005-01-20 11:05:34 +1100
commit611649ebf093bf030f2dde18103dde8c1af9226c (patch)
tree123d4895161d5a2b0fe9b07b295ac310d3000bc6 /auth2-chall.c
parentea7c8127ce64879f81d6267897162a2fbf173124 (diff)
- dtucker@cvs.openbsd.org 2005/01/19 13:11:47
[auth-bsdauth.c auth2-chall.c] Have keyboard-interactive code call the drivers even for responses for invalid logins. This allows the drivers themselves to decide how to handle them and prevent leaking information where possible. Existing behaviour for bsdauth is maintained by checking authctxt->valid in the bsdauth driver. Note that any third-party kbdint drivers will now need to be able to handle responses for invalid logins. ok markus@
Diffstat (limited to 'auth2-chall.c')
-rw-r--r--auth2-chall.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/auth2-chall.c b/auth2-chall.c
index 486baaaa3..29234439c 100644
--- a/auth2-chall.c
+++ b/auth2-chall.c
@@ -23,7 +23,7 @@
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: auth2-chall.c,v 1.21 2004/06/01 14:20:45 dtucker Exp $"); 26RCSID("$OpenBSD: auth2-chall.c,v 1.22 2005/01/19 13:11:47 dtucker Exp $");
27 27
28#include "ssh2.h" 28#include "ssh2.h"
29#include "auth.h" 29#include "auth.h"
@@ -274,12 +274,7 @@ input_userauth_info_response(int type, u_int32_t seq, void *ctxt)
274 } 274 }
275 packet_check_eom(); 275 packet_check_eom();
276 276
277 if (authctxt->valid) { 277 res = kbdintctxt->device->respond(kbdintctxt->ctxt, nresp, response);
278 res = kbdintctxt->device->respond(kbdintctxt->ctxt,
279 nresp, response);
280 } else {
281 res = -1;
282 }
283 278
284 for (i = 0; i < nresp; i++) { 279 for (i = 0; i < nresp; i++) {
285 memset(response[i], 'r', strlen(response[i])); 280 memset(response[i], 'r', strlen(response[i]));
@@ -291,7 +286,7 @@ input_userauth_info_response(int type, u_int32_t seq, void *ctxt)
291 switch (res) { 286 switch (res) {
292 case 0: 287 case 0:
293 /* Success! */ 288 /* Success! */
294 authenticated = 1; 289 authenticated = authctxt->valid ? 1 : 0;
295 break; 290 break;
296 case 1: 291 case 1:
297 /* Authentication needs further interaction */ 292 /* Authentication needs further interaction */