mirror of
https://github.com/samba-team/samba.git
synced 2025-01-03 01:18:10 +03:00
cldap: Make finddcs.out.netlogon a pointer
struct netlogon_samlogon_response has subpointers, this patch enables a proper talloc hierarchy. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
parent
31d1fc0912
commit
43b2d4104b
@ -34,7 +34,7 @@ struct finddcs {
|
|||||||
} in;
|
} in;
|
||||||
struct {
|
struct {
|
||||||
const char *address; /* IP address of server */
|
const char *address; /* IP address of server */
|
||||||
struct netlogon_samlogon_response netlogon;
|
struct netlogon_samlogon_response *netlogon;
|
||||||
} out;
|
} out;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -461,8 +461,7 @@ NTSTATUS finddcs_cldap_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, struct
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
talloc_steal(mem_ctx, state->netlogon);
|
io->out.netlogon = talloc_move(mem_ctx, &state->netlogon->out.netlogon);
|
||||||
io->out.netlogon = *state->netlogon->out.netlogon;
|
|
||||||
io->out.address = talloc_steal(
|
io->out.address = talloc_steal(
|
||||||
mem_ctx, state->srv_addresses[state->srv_address_index]);
|
mem_ctx, state->srv_addresses[state->srv_address_index]);
|
||||||
|
|
||||||
|
@ -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);
|
io->out.dcs = talloc(mem_ctx, struct nbt_dc_name);
|
||||||
NT_STATUS_HAVE_NO_MEMORY(io->out.dcs);
|
NT_STATUS_HAVE_NO_MEMORY(io->out.dcs);
|
||||||
io->out.dcs[0].address = finddcs_io.out.address;
|
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;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -766,8 +766,10 @@ static PyObject *py_net_finddc(py_net_Object *self, PyObject *args, PyObject *kw
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = py_return_ndr_struct("samba.dcerpc.nbt", "NETLOGON_SAM_LOGON_RESPONSE_EX",
|
ret = py_return_ndr_struct("samba.dcerpc.nbt",
|
||||||
io, &io->out.netlogon.data.nt5_ex);
|
"NETLOGON_SAM_LOGON_RESPONSE_EX",
|
||||||
|
io,
|
||||||
|
&io->out.netlogon->data.nt5_ex);
|
||||||
talloc_free(mem_ctx);
|
talloc_free(mem_ctx);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user