Subject: | Errors from SASL client_start are not returned |
In bind(), if the SASL client_start call fails, the exact error message
is swallowed, and the user gets a generic "Local error" message back.
The error handling looks like this:
my $initial = $sasl_conn->client_start;
return _error($ldap, $mesg, LDAP_LOCAL_ERROR, "$@")
unless defined($initial);
This looks like a copy & paste from a few lines above, where errors
creating $sasl_conn are caught by an eval. In this case, there is no
eval, and "$@" will always be empty. To return the exact SASL error
message to the caller, I think the last parameter here should be
$sasl_conn->error().