r9414: Fix failure to find own domain info due to recent ldb_dn upgrade - we
authorAndrew Bartlett <abartlet@samba.org>
Sat, 20 Aug 2005 06:01:49 +0000 (06:01 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:33:36 +0000 (13:33 -0500)
don't use a simple char* here any more.

Andrew Bartlett
(This used to be commit f21c31c7e151e23caa2699b1727d1ae310fbed4e)

source4/lib/credentials.c

index 58a1b8c0e33f518e8c605d9d5729ac552a085090..aae55be800c07c5b105f227c35633be9ae540c14 100644 (file)
@@ -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) {