diff options
| author | fukachan <fukachan> | 2003-05-12 10:16:38 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2003-05-12 10:16:38 +0000 |
| commit | f914afdbe83507cccca18b7953c3992aa18abc6e (patch) | |
| tree | 180a0aded945a705945a8a474e8c377f35c2ffb4 /fml/lib/FML/Command/Auth.pm | |
| parent | b8e34c6b65bd5e1b5838204265e35845306a6f19 (diff) | |
| download | fml8-f914afdbe83507cccca18b7953c3992aa18abc6e.tar.gz fml8-f914afdbe83507cccca18b7953c3992aa18abc6e.tar.bz2 fml8-f914afdbe83507cccca18b7953c3992aa18abc6e.zip | |
we should operate only $primary_*_map not $*_maps in deleting the user
address.
Diffstat (limited to 'fml/lib/FML/Command/Auth.pm')
| -rw-r--r-- | fml/lib/FML/Command/Auth.pm | 42 |
1 files changed, 18 insertions, 24 deletions
diff --git a/fml/lib/FML/Command/Auth.pm b/fml/lib/FML/Command/Auth.pm index 492e6232..df833689 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.24 2003/03/18 10:42:41 fukachan Exp $ +# $FML: Auth.pm,v 1.25 2003/03/28 10:32:21 fukachan Exp $ # package FML::Command::Auth; @@ -216,8 +216,7 @@ sub check_admin_member_password sub change_password { my ($self, $curproc, $command_args, $up_args) = @_; - my $maplist = $up_args->{ maplist }; - my $pri_map = $up_args->{ primary_map }; + my $map = $up_args->{ map }; my $address = $up_args->{ address }; my $password = $up_args->{ password }; my $status = 0; @@ -229,36 +228,31 @@ sub change_password $curproc->lock($lock_channel); - # XXX delete entries for address among ALL MAPS. use IO::Adapter; - for my $map (@$maplist) { - my $obj = new IO::Adapter $map; - if (defined $obj) { - $obj->open(); - if ($obj->find( $address )) { - $obj->delete( $address ); - if ($obj->error()) { - LogError("cannot delete $address from=$map"); - } - else { - Log("delete $address from=$map"); - } + my $obj = new IO::Adapter $map; + if (defined $obj) { + $obj->open(); + + # delete + if ($obj->find( $address )) { + $obj->delete( $address ); + if ($obj->error()) { + LogError("cannot delete $address from=$map"); + } + else { + Log("delete $address from=$map"); } - $obj->close(); } - } - # XXX add password entry to ONLY primary map. o.k. ? - my $obj = new IO::Adapter $pri_map; - if (defined $obj) { - $obj->open(); + # add $obj->add( $address, [ $cp, "UNIX_CRYPT" ] ) && $status++; if ($obj->error()) { - LogError("cannot add $address to=$pri_map"); + LogError("cannot add $address to=$map"); } else { - Log("add password for $address to=$pri_map"); + Log("add password for $address to=$map"); } + $obj->close(); } |
