httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Behlendorf <br...@hyperreal.com>
Subject cvs commit: apache/support dbmmanage
Date Tue, 08 Oct 1996 07:00:40 GMT
brian       96/10/08 00:00:38

  Modified:    support   dbmmanage
  Log:
  Reviewed by:	robh@imdb.com, brian@organic.com
  Submitted by:	apollo@randomc.com
  
  Adds a real random salt to the password generator.
  
  Revision  Changes    Path
  1.4       +6 -3      apache/support/dbmmanage
  
  Index: dbmmanage
  ===================================================================
  RCS file: /export/home/cvs/apache/support/dbmmanage,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -C3 -r1.3 -r1.4
  *** dbmmanage	1996/08/20 13:25:03	1.3
  --- dbmmanage	1996/10/08 07:00:37	1.4
  ***************
  *** 1,5 ****
    #!/usr/local/bin/perl
  ! # $Id: dbmmanage,v 1.3 1996/08/20 13:25:03 paul Exp $
    
    # ====================================================================
    # Copyright (c) 1995 The Apache Group.  All rights reserved.
  --- 1,5 ----
    #!/usr/local/bin/perl
  ! # $Id: dbmmanage,v 1.4 1996/10/08 07:00:37 brian Exp $
    
    # ====================================================================
    # Copyright (c) 1995 The Apache Group.  All rights reserved.
  ***************
  *** 70,82 ****
    	exit;
    }
    
  - # ugly - this should be changed to be random.
  - $salt="XX";
    $file=$ARGV[0];
    $command=$ARGV[1];
    $key=$ARGV[2];
    $value=$ARGV[3];
    $group=$ARGV[4];
    
    if ($command eq "add") {
            dbmopen(%DB, $file, 0664) || die "Error: $!\n";
  --- 70,85 ----
    	exit;
    }
    
    $file=$ARGV[0];
    $command=$ARGV[1];
    $key=$ARGV[2];
    $value=$ARGV[3];
    $group=$ARGV[4];
  + 
  + # create a random salt
  + @range=('0'..'9','a'..'z','A'..'Z');
  + srand($$|time);
  + $salt=$range[rand(int($#range)+1)] . $range[rand(int($#range)+1)];
    
    if ($command eq "add") {
            dbmopen(%DB, $file, 0664) || die "Error: $!\n";
  
  
  

Mime
View raw message