From: Dobrica Pavlinusic Date: Sat, 14 Mar 2009 14:44:45 +0000 (+0000) Subject: correctly construct bind arguments X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=1d349dd237d46bf7b773a292c249df3faf866537;p=virtual-ldap correctly construct bind arguments --- diff --git a/lib/VLDAP/Server.pm b/lib/VLDAP/Server.pm index 7084080..9e497ea 100644 --- a/lib/VLDAP/Server.pm +++ b/lib/VLDAP/Server.pm @@ -158,10 +158,11 @@ sub bind { #$msg = $self->{upstream}->unbind; #warn "# unbind msg = ",dump( $msg ); - $msg = $self->{upstream}->bind( - dn => $req->{name}, - password => $req->{authentication}->{simple} - ); + my $bind; + $bind->{dn} = $req->{name} if $req->{name}; + $bind->{password} = $req->{authentication}->{simple} if $req->{authentication}->{simple}; + warn "# bind ",dump( $bind ); + $msg = $self->{upstream}->bind( %$bind ); #warn "# bind msg = ",dump( $msg ); if ( $msg->code != LDAP_SUCCESS ) {