s4-net: fixed finddcs to use empty SID instead of NULL sid (NDR error)
authorAndrew Tridgell <tridge@samba.org>
Thu, 31 Dec 2009 05:53:14 +0000 (16:53 +1100)
committerAndrew Tridgell <tridge@samba.org>
Thu, 31 Dec 2009 06:33:53 +0000 (17:33 +1100)
source4/libcli/finddcs.c

index 8330042ea14b0d5e8ee77b1c515af89732ac0ed0..04b25d37efa9a5c7734afe9744bf296a0d628013 100644 (file)
@@ -158,6 +158,9 @@ static void finddcs_name_resolved(struct composite_context *ctx)
        if (composite_nomem(state->r.in.my_accountname, state->ctx)) return;
        state->r.in.account_control = ACB_WSTRUST;
        state->r.in.domain_sid = state->domain_sid;
+       if (state->r.in.domain_sid == NULL) {
+               state->r.in.domain_sid = talloc_zero(state, struct dom_sid);
+       }
 
        ireq = irpc_call_send(state->msg_ctx, nbt_servers[0],
                              &ndr_table_irpc, NDR_NBTD_GETDCNAME,