~ubuntu-branches/ubuntu/lucid/openssh/lucid

« back to all changes in this revision

Viewing changes to auth1.c

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2008-09-30 23:09:58 UTC
  • mfrom: (1.13.3 upstream) (29 hardy)
  • mto: This revision was merged to the branch mainline in revision 43.
  • Revision ID: james.westby@ubuntu.com-20080930230958-o6vsgn8c4mm959s0
Tags: 1:5.1p1-3
* Remove unnecessary ssh-vulnkey output in non-verbose mode when no
  compromised or unknown keys were found (closes: #496495).
* Configure with --disable-strip; dh_strip will deal with stripping
  binaries and will honour DEB_BUILD_OPTIONS (thanks, Bernhard R. Link;
  closes: #498681).
* Fix handling of zero-length server banners (thanks, Tomas Mraz; closes:
  #497026).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $OpenBSD: auth1.c,v 1.70 2006/08/03 03:34:41 deraadt Exp $ */
 
1
/* $OpenBSD: auth1.c,v 1.73 2008/07/04 23:30:16 djm Exp $ */
2
2
/*
3
3
 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4
4
 *                    All rights reserved
20
20
#include <unistd.h>
21
21
#include <pwd.h>
22
22
 
 
23
#include "openbsd-compat/sys-queue.h"
23
24
#include "xmalloc.h"
24
25
#include "rsa.h"
25
26
#include "ssh1.h"
283
284
                    type != SSH_CMSG_AUTH_TIS_RESPONSE)
284
285
                        abandon_challenge_response(authctxt);
285
286
 
 
287
                if (authctxt->failures >= options.max_authtries)
 
288
                        goto skip;
286
289
                if ((meth = lookup_authmethod1(type)) == NULL) {
287
290
                        logit("Unknown message during authentication: "
288
291
                            "type %d", type);
351
354
                                        msg[len] = '\0';
352
355
                        else
353
356
                                msg = "Access denied.";
354
 
                        packet_disconnect(msg);
 
357
                        packet_disconnect("%s", msg);
355
358
                }
356
359
#endif
357
360
 
367
370
                if (authenticated)
368
371
                        return;
369
372
 
370
 
                if (authctxt->failures++ > options.max_authtries) {
 
373
                if (++authctxt->failures >= options.max_authtries) {
371
374
#ifdef SSH_AUDIT_EVENTS
372
375
                        PRIVSEP(audit_event(SSH_LOGIN_EXCEED_MAXTRIES));
373
376
#endif