summaryrefslogtreecommitdiffstats
path: root/adduser
diff options
context:
space:
mode:
authorDima Dorfman <dd@FreeBSD.org>2001-07-19 12:00:04 +0000
committerDima Dorfman <dd@FreeBSD.org>2001-07-19 12:00:04 +0000
commit79b521cad9cc75dc90f198d6bfeb529838280be5 (patch)
tree76a24656a213ab5f33b82d321874be86c3bb2272 /adduser
parentadcfcd14695746b3670ce6d73eb79b8e6085b41a (diff)
downloadpw-darwin-79b521cad9cc75dc90f198d6bfeb529838280be5.tar.gz
pw-darwin-79b521cad9cc75dc90f198d6bfeb529838280be5.tar.zst
pw-darwin-79b521cad9cc75dc90f198d6bfeb529838280be5.zip
Generate a bigger salt. This is necessary for blowfish to work
properly, and doesn't hurt the other algorithms. PR: 28991 Submitted by: Yoshihiro Koya <Yoshihiro.Koya@math.yokohama-cu.ac.jp>
Diffstat (limited to 'adduser')
-rw-r--r--adduser/adduser.perl2
1 files changed, 1 insertions, 1 deletions
diff --git a/adduser/adduser.perl b/adduser/adduser.perl
index e70349c..58cffec 100644
--- a/adduser/adduser.perl
+++ b/adduser/adduser.perl
@@ -894,7 +894,7 @@ sub salt {
warn "calculate salt\n" if $verbose > 1;
# to64
- for ($i = 0; $i < 8; $i++) {
+ for ($i = 0; $i < 27; $i++) {
srand(time + $rand + $$);
$rand = rand(25*29*17 + $rand);
$salt .= $itoa64[$rand & $#itoa64];