Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/ab5b91301f45
branches:  netbsd-2
changeset: 564430:ab5b91301f45
user:      riz <riz%NetBSD.org@localhost>
date:      Fri Mar 17 17:18:27 2006 +0000

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

diffstat:

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

diffs (38 lines):

diff -r 7e156c6a0136 -r ab5b91301f45 usr.bin/login/login.c
--- a/usr.bin/login/login.c     Fri Mar 17 17:07:13 2006 +0000
+++ b/usr.bin/login/login.c     Fri Mar 17 17:18:27 2006 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: login.c,v 1.77.4.1 2006/03/17 17:07:13 riz Exp $       */
+/*     $NetBSD: login.c,v 1.77.4.2 2006/03/17 17:18:27 riz 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.c,v 1.77.4.1 2006/03/17 17:07:13 riz Exp $");
+__RCSID("$NetBSD: login.c,v 1.77.4.2 2006/03/17 17:18:27 riz Exp $");
 #endif /* not lint */
 
 /*
@@ -502,13 +502,17 @@
                    "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);
                                sleepexit(1);
                        }
-                       sleep((u_int)((cnt - 3) * 5));
+                       sleep((u_int)((cnt - login_backoff) * 5));
                }
        }
 



Home | Main Index | Thread Index | Old Index