projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f5be6be
)
ldap export: don't use password if not given
author
ivan
<ivan>
Tue, 19 Nov 2002 21:20:03 +0000
(21:20 +0000)
committer
ivan
<ivan>
Tue, 19 Nov 2002 21:20:03 +0000
(21:20 +0000)
FS/FS/part_export/ldap.pm
patch
|
blob
|
history
diff --git
a/FS/FS/part_export/ldap.pm
b/FS/FS/part_export/ldap.pm
index
6077b74
..
776814c
100644
(file)
--- a/
FS/FS/part_export/ldap.pm
+++ b/
FS/FS/part_export/ldap.pm
@@
-225,12
+225,14
@@
sub ldap_insert { #subroutine, not method
sub ldap_connect {
my( $machine, $dn, $password ) = @_;
sub ldap_connect {
my( $machine, $dn, $password ) = @_;
+ my %bind_options;
+ $bind_options{password} = $password if length($password);
eval "use Net::LDAP";
die $@ if $@;
my $ldap = Net::LDAP->new($machine) or die $@;
eval "use Net::LDAP";
die $@ if $@;
my $ldap = Net::LDAP->new($machine) or die $@;
- my $status = $ldap->bind( $dn,
password=>$password
);
+ my $status = $ldap->bind( $dn,
%bind_options
);
die $status->error if $status->is_error;
$dn;
die $status->error if $status->is_error;
$dn;