Skip to content

Commit f353ce5

Browse files
cryptomilkabartlet
authored andcommitted
s4:dfs_server: Use lpcfg_dns_hostname() in dfs_server_ad.c
Signed-off-by: Andreas Schneider <[email protected]> Reviewed-by: Andrew Bartlett <[email protected]>
1 parent f3f8aa4 commit f353ce5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

dfs_server/dfs_server_ad.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,7 @@ NTSTATUS dfs_server_ad_get_referrals(struct loadparm_context *lp_ctx,
804804
const char *netbios_domain;
805805
const char *dns_domain;
806806
const char *netbios_name;
807-
const char *dns_name;
807+
const char *dns_hostname = NULL;
808808
const char **netbios_aliases;
809809
char path_separator;
810810

@@ -863,13 +863,13 @@ NTSTATUS dfs_server_ad_get_referrals(struct loadparm_context *lp_ctx,
863863
netbios_domain = lpcfg_workgroup(lp_ctx);
864864
dns_domain = lpcfg_dnsdomain(lp_ctx);
865865
netbios_name = lpcfg_netbios_name(lp_ctx);
866-
dns_name = talloc_asprintf(r, "%s.%s", netbios_name, dns_domain);
867-
if (dns_name == NULL) {
866+
dns_hostname = lpcfg_dns_hostname(lp_ctx);
867+
if (dns_hostname == NULL) {
868868
return NT_STATUS_NO_MEMORY;
869869
}
870870

871871
if ((strcasecmp_m(server_name, netbios_name) == 0) ||
872-
(strcasecmp_m(server_name, dns_name) == 0)) {
872+
(strcasecmp_m(server_name, dns_hostname) == 0)) {
873873
/*
874874
* If it is not domain related do not
875875
* handle it here.

0 commit comments

Comments
 (0)