From: Andrew Bartlett Date: Thu, 26 Feb 2009 02:12:07 +0000 (+1100) Subject: A simple hack to avoid the segfault in #6138 X-Git-Url: http://git.samba.org/samba.git/?p=kai%2Fsamba.git;a=commitdiff_plain;h=76a0050e239b1fb9e2135f2e6cea80ed780a0ee0 A simple hack to avoid the segfault in #6138 Thanks to Andrew Kroeger for reporting this. This fix just for the release. A better fix will make it into the master branch soon. Andrew Bartlett --- diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c index f1c063ed906..2efddc74fc7 100644 --- a/source4/rpc_server/netlogon/dcerpc_netlogon.c +++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c @@ -1220,7 +1220,7 @@ static WERROR dcesrv_netr_DsRGetDCNameEx2(struct dcesrv_call_state *dce_call, TA /* Win7-beta will send the domain name in the form the user typed, so we have to cope with both the short and long form here */ - if (strcasecmp(r->in.domain_name, lp_workgroup(dce_call->conn->dce_ctx->lp_ctx)) == 0) { + if (r->in.domain_name == NULL || strcasecmp(r->in.domain_name, lp_workgroup(dce_call->conn->dce_ctx->lp_ctx)) == 0) { r->in.domain_name = lp_realm(dce_call->conn->dce_ctx->lp_ctx); }