Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-3]: src/usr.bin/login Pull up following revision(s) (requested by...



details:   https://anonhg.NetBSD.org/src/rev/35cd00b6c5aa
branches:  netbsd-3
changeset: 577880:35cd00b6c5aa
user:      tron <tron%NetBSD.org@localhost>
date:      Fri Mar 10 13:28:21 2006 +0000

description:
Pull up following revision(s) (requested by jnemeth in ticket #1201):
        usr.bin/login/login_pam.c: revision 1.14
PR/23616: Christian Biere: login might not back-off as expected

diffstat:

 usr.bin/login/login_pam.c |  12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diffs (39 lines):

diff -r 1d7b4f7b4e94 -r 35cd00b6c5aa usr.bin/login/login_pam.c
--- a/usr.bin/login/login_pam.c Fri Mar 10 13:24:47 2006 +0000
+++ b/usr.bin/login/login_pam.c Fri Mar 10 13:28:21 2006 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: login_pam.c,v 1.4.2.5 2006/03/09 16:54:10 tron Exp $       */
+/*     $NetBSD: login_pam.c,v 1.4.2.6 2006/03/10 13:28:21 tron Exp $       */
 
 /*-
  * Copyright (c) 1980, 1987, 1988, 1991, 1993, 1994
@@ -40,7 +40,7 @@
 #if 0
 static char sccsid[] = "@(#)login.c    8.4 (Berkeley) 4/2/94";
 #endif
-__RCSID("$NetBSD: login_pam.c,v 1.4.2.5 2006/03/09 16:54:10 tron Exp $");
+__RCSID("$NetBSD: login_pam.c,v 1.4.2.6 2006/03/10 13:28:21 tron Exp $");
 #endif /* not lint */
 
 /*
@@ -424,14 +424,18 @@
                (void)printf("Login incorrect or refused on this terminal.\n");
                failures++;
                cnt++;
-               /* we allow 10 tries, but after 3 we start backing off */
+               /*
+                * We allow login_retries tries, but after login_backoff
+                * we start backing off.  These default to 10 and 3
+                * respectively.
+                */
                if (cnt > login_backoff) {
                        if (cnt >= login_retries) {
                                badlogin(username);
                                pam_end(pamh, PAM_SUCCESS);
                                sleepexit(EXIT_FAILURE);
                        }
-                       sleep((u_int)((cnt - 3) * 5));
+                       sleep((u_int)((cnt - login_backoff) * 5));
                }
        }
 



Home | Main Index | Thread Index | Old Index