summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/cldap_server/netlogon.c4
-rw-r--r--source4/dsdb/common/util.c10
-rw-r--r--source4/rpc_server/netlogon/dcerpc_netlogon.c4
3 files changed, 15 insertions, 3 deletions
diff --git a/source4/cldap_server/netlogon.c b/source4/cldap_server/netlogon.c
index b06fd609f2..c565f2fb1a 100644
--- a/source4/cldap_server/netlogon.c
+++ b/source4/cldap_server/netlogon.c
@@ -251,8 +251,8 @@ NTSTATUS fill_netlogon_samlogon_response(struct ldb_context *sam_ctx,
dns_domain);
flatname = lp_sam_name(lp_ctx);
- /* FIXME: Hardcoded site names */
- server_site = "Default-First-Site-Name";
+ server_site = samdb_server_site_name(sam_ctx, mem_ctx);
+ /* FIXME: Hardcoded site name */
client_site = "Default-First-Site-Name";
load_interfaces(mem_ctx, lp_interfaces(lp_ctx), &ifaces);
pdc_ip = iface_best_ip(ifaces, src_address);
diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c
index c9562b0de7..ace8e185ab 100644
--- a/source4/dsdb/common/util.c
+++ b/source4/dsdb/common/util.c
@@ -1432,6 +1432,16 @@ struct ldb_dn *samdb_server_site_dn(struct ldb_context *ldb, TALLOC_CTX *mem_ctx
return server_site_dn;
}
+const char *samdb_server_site_name(struct ldb_context *ldb, TALLOC_CTX *mem_ctx)
+{
+ const struct ldb_val *val = ldb_dn_get_rdn_val(samdb_server_site_dn(ldb, mem_ctx));
+
+ if (val != NULL)
+ return (const char *) val->data;
+ else
+ return NULL;
+}
+
/*
work out if we are the PDC for the domain of the current open ldb
*/
diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c
index 3eaa64d82b..f04f4be59c 100644
--- a/source4/rpc_server/netlogon/dcerpc_netlogon.c
+++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c
@@ -1457,8 +1457,9 @@ static WERROR dcesrv_netr_DsRGetDCNameEx2(struct dcesrv_call_state *dce_call, TA
DS_SERVER_LDAP |
DS_SERVER_GC |
DS_SERVER_PDC;
- info->dc_site_name = talloc_strdup(mem_ctx, "Default-First-Site-Name");
+ info->dc_site_name = samdb_server_site_name(sam_ctx, mem_ctx);
W_ERROR_HAVE_NO_MEMORY(info->dc_site_name);
+ /* FIXME: Hardcoded site name */
info->client_site_name = talloc_strdup(mem_ctx, "Default-First-Site-Name");
W_ERROR_HAVE_NO_MEMORY(info->client_site_name);
@@ -1561,6 +1562,7 @@ static WERROR dcesrv_netr_DsRAddressToSitenamesExW(struct dcesrv_call_state *dce
W_ERROR_HAVE_NO_MEMORY(ctr->subnetname);
for (i=0; i<ctr->count; i++) {
+ /* FIXME: Hardcoded site name */
ctr->sitename[i].string = "Default-First-Site-Name";
ctr->subnetname[i].string = NULL;
}