summaryrefslogtreecommitdiff
path: root/src/providers/ldap/sdap_async_connection.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/providers/ldap/sdap_async_connection.c')
-rw-r--r--src/providers/ldap/sdap_async_connection.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/providers/ldap/sdap_async_connection.c b/src/providers/ldap/sdap_async_connection.c
index 20f282e3..b673daf6 100644
--- a/src/providers/ldap/sdap_async_connection.c
+++ b/src/providers/ldap/sdap_async_connection.c
@@ -1628,15 +1628,17 @@ static void sdap_cli_auth_step(struct tevent_req *req)
tevent_req_error(req, EINVAL);
return;
}
+
authtok_blob = dp_opt_get_blob(state->opts->basic,
SDAP_DEFAULT_AUTHTOK);
-
- ret = sss_authtok_set_password(state, &authtok,
- (const char *)authtok_blob.data,
- authtok_blob.length);
- if (ret) {
- tevent_req_error(req, ret);
- return;
+ if (authtok_blob.data) {
+ ret = sss_authtok_set_password(state, &authtok,
+ (const char *)authtok_blob.data,
+ authtok_blob.length);
+ if (ret) {
+ tevent_req_error(req, ret);
+ return;
+ }
}
}