summaryrefslogtreecommitdiff
path: root/source4/lib/ldb
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb')
-rw-r--r--source4/lib/ldb/ldb_ildap/ldb_ildap.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source4/lib/ldb/ldb_ildap/ldb_ildap.c b/source4/lib/ldb/ldb_ildap/ldb_ildap.c
index bb89fc910e..3d47863067 100644
--- a/source4/lib/ldb/ldb_ildap/ldb_ildap.c
+++ b/source4/lib/ldb/ldb_ildap/ldb_ildap.c
@@ -474,8 +474,7 @@ int ildb_connect(struct ldb_context *ldb, const char *url,
ldb->modules->private_data = ildb;
ldb->modules->ops = &ildb_ops;
- if (cmdline_credentials != NULL &&
- cmdline_credentials->username_obtained > CRED_GUESSED) {
+ if (cmdline_credentials != NULL && cli_credentials_authentication_requested(cmdline_credentials)) {
status = ldap_bind_sasl(ildb->ldap, cmdline_credentials);
if (!NT_STATUS_IS_OK(status)) {
ldb_debug(ldb, LDB_DEBUG_ERROR, "Failed to bind - %s\n",