From 1d349dd237d46bf7b773a292c249df3faf866537 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Sat, 14 Mar 2009 14:44:45 +0000 Subject: [PATCH] correctly construct bind arguments --- lib/VLDAP/Server.pm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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 ) { -- 2.20.1