Source-Changes-HG archive

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

[src/trunk]: src/etc md5/bcrypt password starts with $[12], so use ^ in regex



details:   https://anonhg.NetBSD.org/src/rev/35c25b6b70b2
branches:  trunk
changeset: 533007:35c25b6b70b2
user:      itojun <itojun%NetBSD.org@localhost>
date:      Tue Jun 18 22:43:53 2002 +0000

description:
md5/bcrypt password starts with $[12], so use ^ in regex

diffstat:

 etc/security |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (22 lines):

diff -r b190f50c74fc -r 35c25b6b70b2 etc/security
--- a/etc/security      Tue Jun 18 22:32:16 2002 +0000
+++ b/etc/security      Tue Jun 18 22:43:53 2002 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh -
 #
-#      $NetBSD: security,v 1.77 2002/06/18 22:21:43 itojun Exp $
+#      $NetBSD: security,v 1.78 2002/06/18 22:43:53 itojun Exp $
 #      from: @(#)security      8.1 (Berkeley) 6/9/93
 #
 
@@ -205,8 +205,8 @@
                        printf "Login %s has no password.\n", $1;
                if (length($2) != 13 &&
                    length($2) != 20 &&
-                   $2 !~ /\$1/ &&
-                   $2 !~ /\$2/ &&
+                   $2 !~ /^\$1/ &&
+                   $2 !~ /^\$2/ &&
                    $2 != "" &&
                    $2 !~ /^\*[A-z-]+$/ &&
                    $1 != "toor") {



Home | Main Index | Thread Index | Old Index