Permalink
Browse files

Merged pull request #1 from cmikk/master.

ldapi:// + SASL authentication fix.
  • Loading branch information...
gbarr committed Apr 28, 2011
2 parents 0a55dd1 + 163be7b commit bdd254c7458175f769e255d07043b4b06f5c1692
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/Net/LDAP.pm
View
@@ -384,7 +384,10 @@ sub bind {
# If we're talking to a round-robin, the canonical name of
# the host we are talking to might not match the name we
# requested
- my $connected_name = $ldap->{net_ldap_socket}->peerhost;
+ my $connected_name;
+ if ($ldap->{net_ldap_socket}->can('peerhost')) {
+ $connected_name = $ldap->{net_ldap_socket}->peerhost;
+ }
$connected_name ||= $ldap->{net_ldap_host};
$sasl_conn = eval {

0 comments on commit bdd254c

Please sign in to comment.