mirror of
https://github.com/samba-team/samba.git
synced 2025-01-03 01:18:10 +03:00
libcli/auth: Ensure that the dns_names in/out parameter is preserved
This is in dcerpc_netr_DsrUpdateReadOnlyServerDnsRecords, which has status variables filled in by the server and placed in this in/out array. This showed up as a segfault in winbindd during RODC DNS update. Andrew Bartlett Signed-off-by: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
This commit is contained in:
parent
95d1828a24
commit
36ecbf34ba
@ -2754,7 +2754,14 @@ static void netlogon_creds_cli_DsrUpdateReadOnlyServerDnsRecords_done(struct tev
|
|||||||
NTSTATUS result;
|
NTSTATUS result;
|
||||||
bool ok;
|
bool ok;
|
||||||
|
|
||||||
status = dcerpc_netr_DsrUpdateReadOnlyServerDnsRecords_recv(subreq, state,
|
/*
|
||||||
|
* We use state->dns_names as the memory context, as this is
|
||||||
|
* the only in/out variable and it has been overwritten by the
|
||||||
|
* out parameter from the server.
|
||||||
|
*
|
||||||
|
* We need to preserve the return value until the caller can use it.
|
||||||
|
*/
|
||||||
|
status = dcerpc_netr_DsrUpdateReadOnlyServerDnsRecords_recv(subreq, state->dns_names,
|
||||||
&result);
|
&result);
|
||||||
TALLOC_FREE(subreq);
|
TALLOC_FREE(subreq);
|
||||||
if (tevent_req_nterror(req, status)) {
|
if (tevent_req_nterror(req, status)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user