s4: Changes the old occurences of "lp_realm" in "lp_dnsdomain" where needed
[samba.git] / source4 / libcli / ldap / ldap_client.c
index 3c78a7c7e29dc0f5a7d58a25466044ee8db1ad81..eb532769362a10d5bd09e51c34789b59cfc5e8c6 100644 (file)
@@ -338,7 +338,9 @@ _PUBLIC_ struct composite_context *ldap_connect_send(struct ldap_connection *con
                /* LDAPI connections are to localhost, so give the
                 * local host name as the target for gensec's
                 * DIGEST-MD5 mechanism */
-               conn->host = talloc_asprintf(conn, "%s.%s", lp_netbios_name(conn->lp_ctx),  lp_realm(conn->lp_ctx));
+               conn->host = talloc_asprintf(conn, "%s.%s",
+                                            lp_netbios_name(conn->lp_ctx),
+                                            lp_dnsdomain(conn->lp_ctx));
                if (composite_nomem(conn->host, state->ctx)) {
                        return result;
                }