diff options
| author | ivan <ivan> | 2002-11-26 10:25:55 +0000 | 
|---|---|---|
| committer | ivan <ivan> | 2002-11-26 10:25:55 +0000 | 
| commit | 3ac3bd76d4716016ba3a51f51a83a02732d9d2de (patch) | |
| tree | 86662353c35c8b1541456c18da9ac16dba3c518d /FS | |
| parent | 1caff2f971082d5ccce9928726b4b2e88678ee7a (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;  }  | 
