You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@locus.apache.org on 2000/09/20 19:12:14 UTC
cvs commit: apache-1.3/src/support dbmmanage
wrowe 00/09/20 10:12:14
Modified: src/support dbmmanage
Log:
Correct dbmmanage pwfile check behavior to ignore [:grp...] contents.
Also add SDBM_File for -lsdbm.
PR: 4695
Submitted by: arnez@raleigh.ibm.com
Reviewed by: wrowe
Revision Changes Path
1.15 +4 -3 apache-1.3/src/support/dbmmanage
Index: dbmmanage
===================================================================
RCS file: /home/cvs/apache-1.3/src/support/dbmmanage,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- dbmmanage 1999/11/28 13:37:53 1.14
+++ dbmmanage 2000/09/20 17:12:13 1.15
@@ -61,8 +61,8 @@
# usage: dbmmanage <DBMfile> <command> <key> <value>
package dbmmanage;
-# -ldb -lndbm -lgdbm
-BEGIN { @AnyDBM_File::ISA = qw(DB_File NDBM_File GDBM_File) }
+# -ldb -lndbm -lgdbm -lsdbm
+BEGIN { @AnyDBM_File::ISA = qw(DB_File NDBM_File GDBM_File SDBM_File) }
use strict;
use Fcntl;
use AnyDBM_File ();
@@ -177,7 +177,8 @@
sub dbmc::check {
die "Sorry, user `$key' doesn't exist!\n" unless $DB{$key};
- print crypt(getpass(), $DB{$key}) eq $DB{$key} ? "password ok\n" : "password mismatch\n";
+ my $chkpass = (split /:/, $DB{$key})[0];
+ print crypt(getpass(), $chkpass) eq $chkpass ? "password ok\n" : "password mismatch\n";
}
sub dbmc::import {