summaryrefslogtreecommitdiffstats
path: root/source4/rpc_server
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-04-13 15:45:29 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-04-13 15:45:29 +0200
commit84c901a619ad4b20c36b84c435fb869e8374bd8a (patch)
tree13c934b530ea5423b69175207c7e255555bc48c0 /source4/rpc_server
parent34ff1c6944a56365390b252f516b6d3aafc8ac50 (diff)
downloadsamba-84c901a619ad4b20c36b84c435fb869e8374bd8a.tar.gz
samba-84c901a619ad4b20c36b84c435fb869e8374bd8a.tar.xz
samba-84c901a619ad4b20c36b84c435fb869e8374bd8a.zip
s4:"samdb_server_site_name" uses - proof for out of memory
Diffstat (limited to 'source4/rpc_server')
-rw-r--r--source4/rpc_server/netlogon/dcerpc_netlogon.c5
1 files changed, 4 insertions, 1 deletions
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;
}