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/rpc_server/netlogon/dcerpc_netlogon.c5
2 files changed, 7 insertions, 2 deletions
diff --git a/source4/cldap_server/netlogon.c b/source4/cldap_server/netlogon.c
index fc9cafd89d..139c1cafdc 100644
--- a/source4/cldap_server/netlogon.c
+++ b/source4/cldap_server/netlogon.c
@@ -250,7 +250,8 @@ NTSTATUS fill_netlogon_samlogon_response(struct ldb_context *sam_ctx,
}
#endif
- pdc_name = talloc_asprintf(mem_ctx, "\\\\%s", lp_netbios_name(lp_ctx));
+ pdc_name = talloc_asprintf(mem_ctx, "\\\\%s",
+ lp_netbios_name(lp_ctx));
NT_STATUS_HAVE_NO_MEMORY(pdc_name);
domain_uuid = samdb_result_guid(dom_res->msgs[0], "objectGUID");
dns_domain = lp_dnsdomain(lp_ctx);
@@ -263,6 +264,7 @@ NTSTATUS fill_netlogon_samlogon_response(struct ldb_context *sam_ctx,
NT_STATUS_HAVE_NO_MEMORY(pdc_dns_name);
flatname = lp_sam_name(lp_ctx);
server_site = samdb_server_site_name(sam_ctx, mem_ctx);
+ NT_STATUS_HAVE_NO_MEMORY(server_site);
/* FIXME: Hardcoded site name */
client_site = "Default-First-Site-Name";
load_interfaces(mem_ctx, lp_interfaces(lp_ctx), &ifaces);
diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c
index 5f85353d9a..596a2ee114 100644
--- a/source4/rpc_server/netlogon/dcerpc_netlogon.c
+++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c
@@ -1476,6 +1476,7 @@ static WERROR dcesrv_netr_DsRGetDCNameEx2(struct dcesrv_call_state *dce_call,
struct netr_DsRGetDCNameInfo *info;
struct loadparm_context *lp_ctx = dce_call->conn->dce_ctx->lp_ctx;
struct socket_address *addr;
+ const char *server_site_name;
char *guid_str;
struct netlogon_samlogon_response response;
NTSTATUS status;
@@ -1494,8 +1495,10 @@ static WERROR dcesrv_netr_DsRGetDCNameEx2(struct dcesrv_call_state *dce_call,
/* "server_unc" is ignored by w2k3 */
/* Proof server site parameter "site_name" if it was specified */
+ server_site_name = samdb_server_site_name(sam_ctx, mem_ctx);
+ W_ERROR_HAVE_NO_MEMORY(server_site_name);
if ((r->in.site_name != NULL) && (strcasecmp(r->in.site_name,
- samdb_server_site_name(sam_ctx, mem_ctx)) != 0)) {
+ server_site_name) != 0)) {
return WERR_NO_SUCH_DOMAIN;
}