diff --git a/source4/libcli/finddc.h b/source4/libcli/finddc.h index 3836d127026..03bc6d9e368 100644 --- a/source4/libcli/finddc.h +++ b/source4/libcli/finddc.h @@ -34,7 +34,7 @@ struct finddcs { } in; struct { const char *address; /* IP address of server */ - struct netlogon_samlogon_response netlogon; + struct netlogon_samlogon_response *netlogon; } out; }; diff --git a/source4/libcli/finddcs_cldap.c b/source4/libcli/finddcs_cldap.c index 19c2993ded5..36d4c7cc0af 100644 --- a/source4/libcli/finddcs_cldap.c +++ b/source4/libcli/finddcs_cldap.c @@ -461,8 +461,7 @@ NTSTATUS finddcs_cldap_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, struct return status; } - talloc_steal(mem_ctx, state->netlogon); - io->out.netlogon = *state->netlogon->out.netlogon; + io->out.netlogon = talloc_move(mem_ctx, &state->netlogon->out.netlogon); io->out.address = talloc_steal( mem_ctx, state->srv_addresses[state->srv_address_index]); diff --git a/source4/libnet/libnet_lookup.c b/source4/libnet/libnet_lookup.c index 63ce6015b66..b52c37f9305 100644 --- a/source4/libnet/libnet_lookup.c +++ b/source4/libnet/libnet_lookup.c @@ -227,7 +227,7 @@ NTSTATUS libnet_LookupDCs_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, io->out.dcs = talloc(mem_ctx, struct nbt_dc_name); NT_STATUS_HAVE_NO_MEMORY(io->out.dcs); io->out.dcs[0].address = finddcs_io.out.address; - io->out.dcs[0].name = finddcs_io.out.netlogon.data.nt5_ex.pdc_dns_name; + io->out.dcs[0].name = finddcs_io.out.netlogon->data.nt5_ex.pdc_dns_name; return status; } diff --git a/source4/libnet/py_net.c b/source4/libnet/py_net.c index 257149d2298..8beb789d4bb 100644 --- a/source4/libnet/py_net.c +++ b/source4/libnet/py_net.c @@ -766,8 +766,10 @@ static PyObject *py_net_finddc(py_net_Object *self, PyObject *args, PyObject *kw return NULL; } - ret = py_return_ndr_struct("samba.dcerpc.nbt", "NETLOGON_SAM_LOGON_RESPONSE_EX", - io, &io->out.netlogon.data.nt5_ex); + ret = py_return_ndr_struct("samba.dcerpc.nbt", + "NETLOGON_SAM_LOGON_RESPONSE_EX", + io, + &io->out.netlogon->data.nt5_ex); talloc_free(mem_ctx); return ret;