1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

libcli/netlogon: We need to handle a bug in FreeIPA (at least <= 4.1.2).

They include the ip address information without setting
NETLOGON_NT_VERSION_5EX_WITH_IP, while using
ndr_push_NETLOGON_SAM_LOGON_RESPONSE_EX instead of
ndr_push_NETLOGON_SAM_LOGON_RESPONSE_EX_with_flags.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
This commit is contained in:
Stefan Metzmacher 2014-12-23 11:09:04 +00:00 committed by Günther Deschner
parent c594804080
commit 0c9ee5b82f

View File

@ -91,9 +91,18 @@ NTSTATUS pull_netlogon_samlogon_response(DATA_BLOB *data, TALLOC_CTX *mem_ctx,
ndr, NDR_SCALARS|NDR_BUFFERS, &response->data.nt5_ex,
ntver);
if (ndr->offset < ndr->data_size) {
ndr_err = ndr_pull_error(ndr, NDR_ERR_UNREAD_BYTES,
"not all bytes consumed ofs[%u] size[%u]",
ndr->offset, ndr->data_size);
TALLOC_FREE(ndr);
/*
* We need to handle a bug in FreeIPA (at least <= 4.1.2).
*
* They include the ip address information without setting
* NETLOGON_NT_VERSION_5EX_WITH_IP, while using
* ndr_push_NETLOGON_SAM_LOGON_RESPONSE_EX instead of
* ndr_push_NETLOGON_SAM_LOGON_RESPONSE_EX_with_flags.
*/
ndr_err = ndr_pull_struct_blob_all(data, mem_ctx,
&response->data.nt5,
(ndr_pull_flags_fn_t)ndr_pull_NETLOGON_SAM_LOGON_RESPONSE_EX);
}
response->ntver = NETLOGON_NT_VERSION_5EX;
if (NDR_ERR_CODE_IS_SUCCESS(ndr_err) && DEBUGLEVEL >= 10) {