summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Command/Auth.pm
diff options
context:
space:
mode:
authorfukachan <fukachan>2003-02-02 04:43:22 +0000
committerfukachan <fukachan>2003-02-02 04:43:22 +0000
commit01ec1512138004075bd8b8b8a8620a82d88a0ea6 (patch)
treea15475663cf4bbbda93b1e740d5a7163a5c2a76d /fml/lib/FML/Command/Auth.pm
parent3506f763d2d480e69e7b454d44c45471e010c581 (diff)
downloadfml8-01ec1512138004075bd8b8b8a8620a82d88a0ea6.tar.gz
fml8-01ec1512138004075bd8b8b8a8620a82d88a0ea6.tar.bz2
fml8-01ec1512138004075bd8b8b8a8620a82d88a0ea6.zip
use FML::Crypt not Crypt::UnixCrypt directly.
FNF
Diffstat (limited to 'fml/lib/FML/Command/Auth.pm')
-rw-r--r--fml/lib/FML/Command/Auth.pm15
1 files changed, 8 insertions, 7 deletions
diff --git a/fml/lib/FML/Command/Auth.pm b/fml/lib/FML/Command/Auth.pm
index c91cd86f..7a8460c3 100644
--- a/fml/lib/FML/Command/Auth.pm
+++ b/fml/lib/FML/Command/Auth.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: Auth.pm,v 1.19 2003/01/03 07:06:39 fukachan Exp $
+# $FML: Auth.pm,v 1.20 2003/01/11 16:05:14 fukachan Exp $
#
package FML::Command::Auth;
@@ -13,10 +13,6 @@ use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD $debug);
use Carp;
use FML::Log qw(Log LogWarn LogError);
-# always use this module's crypt
-BEGIN { $Crypt::UnixCrpyt::OVERRIDE_BUILTIN = 1 }
-use Crypt::UnixCrypt;
-
=head1 NAME
@@ -162,10 +158,13 @@ sub check_admin_member_password
# if this $map has this $user entry,
# try to check { user => password } relation.
if (defined $pwent) {
+ use FML::Crypt;
+ my $crypt = new FML::Crypt;
+
PASSWORD_ENTRY:
for my $r (@$pwent) {
my ($u, $p_infile) = split(/\s+/, $r);
- my $p_input = crypt( $password, $p_infile );
+ my $p_input = $crypt->unix_crypt($password, $p_infile);
# XXX-TODO: is_same_assress() validates input ???
# XXX-TODO: we need to validate addresses here ???
@@ -173,7 +172,9 @@ sub check_admin_member_password
if ($cred->is_same_address($u, $address)) {
# 1.2 password match ?
if ($p_infile eq $p_input) {
- Log("check_admin_member_password: password match") if $debug;
+ if ($debug) {
+ Log("check_admin_member_password: password match");
+ }
return 1;
}
}