Source-Changes-HG archive

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

[src/netbsd-1-6]: src/usr.bin/passwd Pullup rev 1.6 (requested by provos in t...



details:   https://anonhg.NetBSD.org/src/rev/af18d5319930
branches:  netbsd-1-6
changeset: 531171:af18d5319930
user:      jmc <jmc%NetBSD.org@localhost>
date:      Fri Mar 26 22:53:14 2004 +0000

description:
Pullup rev 1.6 (requested by provos in ticket #1386)

Introduce bcrypt password scheme. Adds the arc4random API for creating
cryptographically strong random numbers.

diffstat:

 usr.bin/passwd/pwd_gensalt.c |  8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diffs (34 lines):

diff -r 9b46607f6b27 -r af18d5319930 usr.bin/passwd/pwd_gensalt.c
--- a/usr.bin/passwd/pwd_gensalt.c      Fri Mar 26 22:53:11 2004 +0000
+++ b/usr.bin/passwd/pwd_gensalt.c      Fri Mar 26 22:53:14 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pwd_gensalt.c,v 1.5 2000/10/09 11:14:17 ad Exp $       */
+/*     $NetBSD: pwd_gensalt.c,v 1.5.4.1 2004/03/26 22:53:14 jmc Exp $  */
 
 /*
  * Copyright 1997 Niels Provos <provos%physnet.uni-hamburg.de@localhost>
@@ -34,7 +34,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: pwd_gensalt.c,v 1.5 2000/10/09 11:14:17 ad Exp $");
+__RCSID("$NetBSD: pwd_gensalt.c,v 1.5.4.1 2004/03/26 22:53:14 jmc Exp $");
 #endif /* not lint */
 
 #include <sys/syslimits.h>
@@ -119,14 +119,12 @@
                to64(&salt[7], random(), 4);
                salt[11] = '$';
                salt[12] = '\0';
-#if 0
-       } else if (strcmp(now, "blowfish")) {
+       } else if (strcmp(now, "blowfish") == 0) {
                rounds = atoi(next);
                if (rounds < 4)
                        rounds = 4;
                strncpy(salt, bcrypt_gensalt(rounds), max - 1);
                salt[max - 1] = 0;
-#endif
        } else {
                strcpy(salt, ":");
                warnx("Unknown option %s.", now);



Home | Main Index | Thread Index | Old Index