Lines 71-76
NTSTATUS fill_netlogon_samlogon_response
|
Link Here
|
---|
|
71 |
const char *server_site; |
71 |
const char *server_site; |
72 |
const char *client_site; |
72 |
const char *client_site; |
73 |
const char *pdc_ip; |
73 |
const char *pdc_ip; |
|
|
74 |
const char *application_fqdn = NULL; |
74 |
struct ldb_dn *domain_dn = NULL; |
75 |
struct ldb_dn *domain_dn = NULL; |
75 |
struct interface *ifaces; |
76 |
struct interface *ifaces; |
76 |
bool user_known = false, am_rodc = false; |
77 |
bool user_known = false, am_rodc = false; |
Lines 83-90
NTSTATUS fill_netlogon_samlogon_response
|
Link Here
|
---|
|
83 |
} |
84 |
} |
84 |
|
85 |
|
85 |
/* Lookup using long or short domainname */ |
86 |
/* Lookup using long or short domainname */ |
86 |
if (domain && (strcasecmp_m(domain, lpcfg_dnsdomain(lp_ctx)) == 0)) { |
87 |
domain_dn = ldb_get_default_basedn(sam_ctx); |
87 |
domain_dn = ldb_get_default_basedn(sam_ctx); |
88 |
if (domain) { |
|
|
89 |
if (strcasecmp_m(domain, lpcfg_dnsdomain(lp_ctx)) == 0) { |
90 |
domain_dn = ldb_get_default_basedn(sam_ctx); |
91 |
} else { |
92 |
application_fqdn = talloc_asprintf(mem_ctx, "ForestDnsZones.%s", |
93 |
lpcfg_dnsdomain(lp_ctx)); |
94 |
if (domain && (strcasecmp_m(domain, application_fqdn) == 0)) { |
95 |
domain_dn = ldb_dn_copy(mem_ctx, ldb_get_default_basedn(sam_ctx)); |
96 |
NT_STATUS_HAVE_NO_MEMORY(domain_dn); |
97 |
if (!ldb_dn_add_child_fmt(domain_dn, "DC=ForestDnsZones")) { |
98 |
return NT_STATUS_NO_MEMORY; |
99 |
} |
100 |
} else { |
101 |
talloc_free(application_fqdn); |
102 |
application_fqdn = talloc_asprintf(mem_ctx, "DomainDnsZones.%s", |
103 |
lpcfg_dnsdomain(lp_ctx)); |
104 |
if (domain && (strcasecmp_m(domain, application_fqdn) == 0)) { |
105 |
domain_dn = ldb_dn_copy(mem_ctx, ldb_get_default_basedn(sam_ctx)); |
106 |
NT_STATUS_HAVE_NO_MEMORY(domain_dn); |
107 |
if (!ldb_dn_add_child_fmt(domain_dn, "DC=DomainDnsZones")) { |
108 |
return NT_STATUS_NO_MEMORY; |
109 |
} |
110 |
} else { |
111 |
talloc_free(application_fqdn); |
112 |
} |
113 |
} |
114 |
} |
88 |
} |
115 |
} |
89 |
if (netbios_domain && (strcasecmp_m(netbios_domain, lpcfg_sam_name(lp_ctx)) == 0)) { |
116 |
if (netbios_domain && (strcasecmp_m(netbios_domain, lpcfg_sam_name(lp_ctx)) == 0)) { |
90 |
domain_dn = ldb_get_default_basedn(sam_ctx); |
117 |
domain_dn = ldb_get_default_basedn(sam_ctx); |
Lines 274-279
NTSTATUS fill_netlogon_samlogon_response
|
Link Here
|
---|
|
274 |
NT_STATUS_HAVE_NO_MEMORY(pdc_dns_name); |
301 |
NT_STATUS_HAVE_NO_MEMORY(pdc_dns_name); |
275 |
flatname = lpcfg_workgroup(lp_ctx); |
302 |
flatname = lpcfg_workgroup(lp_ctx); |
276 |
|
303 |
|
|
|
304 |
if (application_fqdn) { |
305 |
dns_domain = application_fqdn; |
306 |
if (!(version & NETLOGON_NT_VERSION_PDC)) { |
307 |
server_type = DS_SERVER_NDNC; |
308 |
server_type |= DS_SERVER_WRITABLE; |
309 |
server_type |= DS_SERVER_LDAP; |
310 |
flatname = NULL; |
311 |
} else { |
312 |
DEBUG(2,("DEBUG: netlogon application_fqdn NETLOGON_NT_VERSION_PDC\n")); |
313 |
} |
314 |
} |
315 |
|
277 |
server_site = samdb_server_site_name(sam_ctx, mem_ctx); |
316 |
server_site = samdb_server_site_name(sam_ctx, mem_ctx); |
278 |
NT_STATUS_HAVE_NO_MEMORY(server_site); |
317 |
NT_STATUS_HAVE_NO_MEMORY(server_site); |
279 |
client_site = samdb_client_site_name(sam_ctx, mem_ctx, |
318 |
client_site = samdb_client_site_name(sam_ctx, mem_ctx, |