summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/credentials.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/lib/credentials.c b/source4/lib/credentials.c
index 58a1b8c0e3..aae55be800 100644
--- a/source4/lib/credentials.c
+++ b/source4/lib/credentials.c
@@ -496,7 +496,6 @@ NTSTATUS cli_credentials_set_machine_account(struct cli_credentials *cred)
struct ldb_context *ldb;
int ldb_ret;
struct ldb_message **msgs;
- const char *base_dn = SECRETS_PRIMARY_DOMAIN_DN;
const char *attrs[] = {
"secret",
"samAccountName",
@@ -527,7 +526,8 @@ NTSTATUS cli_credentials_set_machine_account(struct cli_credentials *cred)
/* search for the secret record */
ldb_ret = gendb_search(ldb,
- mem_ctx, base_dn, &msgs, attrs,
+ mem_ctx, ldb_dn_explode(mem_ctx, SECRETS_PRIMARY_DOMAIN_DN),
+ &msgs, attrs,
SECRETS_PRIMARY_DOMAIN_FILTER,
cli_credentials_get_domain(cred));
if (ldb_ret == 0) {