diff --git a/auth/ntlmssp/gensec_ntlmssp_server.c b/auth/ntlmssp/gensec_ntlmssp_server.c index 8767c0897f7..6da13a1a6fe 100644 --- a/auth/ntlmssp/gensec_ntlmssp_server.c +++ b/auth/ntlmssp/gensec_ntlmssp_server.c @@ -201,22 +201,7 @@ NTSTATUS gensec_ntlmssp_server_start(struct gensec_security *gensec_security) if (gensec_security->settings->server_dns_name) { dns_name = gensec_security->settings->server_dns_name; } else { - const char *dnsdomain = lpcfg_dnsdomain(gensec_security->settings->lp_ctx); - char *lower_netbiosname; - - lower_netbiosname = strlower_talloc(ntlmssp_state, netbios_name); - NT_STATUS_HAVE_NO_MEMORY(lower_netbiosname); - - /* Find out the DNS host name */ - if (dnsdomain && dnsdomain[0] != '\0') { - dns_name = talloc_asprintf(ntlmssp_state, "%s.%s", - lower_netbiosname, - dnsdomain); - talloc_free(lower_netbiosname); - NT_STATUS_HAVE_NO_MEMORY(dns_name); - } else { - dns_name = lower_netbiosname; - } + dns_name = lpcfg_dns_hostname(gensec_security->settings->lp_ctx); } if (gensec_security->settings->server_dns_domain) {