diff options
| author | ivan <ivan> | 2002-11-26 10:25:57 +0000 | 
|---|---|---|
| committer | ivan <ivan> | 2002-11-26 10:25:57 +0000 | 
| commit | 619b855386019c4e2e242e8df3ccfe842f09566d (patch) | |
| tree | 92f1a842db0b3a5112afca5b4ca2cac8be01cb74 /FS | |
| parent | 5b2f04ff9409843d59b4daf05f42d1688fc8bd68 (diff) | |
ldap export: fix $crypt_password
Diffstat (limited to 'FS')
| -rw-r--r-- | FS/FS/part_export/ldap.pm | 9 | 
1 files changed, 5 insertions, 4 deletions
| diff --git a/FS/FS/part_export/ldap.pm b/FS/FS/part_export/ldap.pm index 68a63528e..fd7f11d90 100644 --- a/FS/FS/part_export/ldap.pm +++ b/FS/FS/part_export/ldap.pm @@ -1,11 +1,13 @@  package FS::part_export::ldap; -use vars qw(@ISA); +use vars qw(@ISA @saltset);  use FS::Record qw( dbh );  use FS::part_export;  @ISA = qw(FS::part_export); +@saltset = ( 'a'..'z' , 'A'..'Z' , '0'..'9' , '.' , '/' ); +  sub rebless { shift; }  sub _export_insert { @@ -26,7 +28,6 @@ sub _export_insert {    $crypt_password = crypt( $svc_acct->_password,                               $saltset[int(rand(64))].$saltset[int(rand(64))] ); -    my $username_attrib;    my %attrib = map    { /^\s*(\w+)\s+(.*\S)\s*$/;                          $username_attrib = $1 if $2 eq '$username'; @@ -218,7 +219,7 @@ sub ldap_insert { #subroutine, not method    }    my $status = $ldap->add( $userdn, attrs => [ %attrib ] ); -  die $status->error if $status->is_error; +  die 'LDAP error: '. $status->error. "\n" if $status->is_error;    $ldap->unbind;  } @@ -245,7 +246,7 @@ sub ldap_connect {    my $ldap = Net::LDAP->new($machine) or die $@;    my $status = $ldap->bind( $dn, %bind_options ); -  die $status->error if $status->is_error; +  die 'LDAP error: '. $status->error. "\n" if $status->is_error;    $ldap;  } | 
