A simple hack to avoid the segfault in #6138
authorAndrew Bartlett <abartlet@samba.org>
Thu, 26 Feb 2009 02:12:07 +0000 (13:12 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 26 Feb 2009 02:12:07 +0000 (13:12 +1100)
Thanks to Andrew Kroeger <andrew@id10ts.net> for reporting this.  This
fix just for the release.  A better fix will make it into the master
branch soon.

Andrew Bartlett

source4/rpc_server/netlogon/dcerpc_netlogon.c

index f1c063ed906d26467652fe4553c3290c53f443df..2efddc74fc71523b92e86d3994e9f986b4272ad7 100644 (file)
@@ -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);
        }