summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-09-24 01:16:10 +0200
committerGünther Deschner <gd@samba.org>2008-09-24 03:34:23 +0200
commit3ee016be9cb6d8d13efcf24fae5d5f0f314379c8 (patch)
treec256e46c3ad6d407b58ceecf022737cefd62288d
parentf07431f5ba59f01975bcb8a012c94a70a0d1408b (diff)
downloadsamba-3ee016be9cb6d8d13efcf24fae5d5f0f314379c8.tar.gz
samba-3ee016be9cb6d8d13efcf24fae5d5f0f314379c8.tar.bz2
samba-3ee016be9cb6d8d13efcf24fae5d5f0f314379c8.zip
libcli: add some basic debugging functions for netlogon helper.
Guenther
-rw-r--r--libcli/netlogon.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libcli/netlogon.c b/libcli/netlogon.c
index 47d665cfa1..ab5d9af8aa 100644
--- a/libcli/netlogon.c
+++ b/libcli/netlogon.c
@@ -82,6 +82,10 @@ NTSTATUS pull_netlogon_samlogon_response(DATA_BLOB *data, TALLOC_CTX *mem_ctx,
&response->nt4,
(ndr_pull_flags_fn_t)ndr_pull_NETLOGON_SAM_LOGON_RESPONSE_NT40);
response->ntver = NETLOGON_NT_VERSION_1;
+ if (NDR_ERR_CODE_IS_SUCCESS(ndr_err) && DEBUGLEVEL >= 10) {
+ NDR_PRINT_DEBUG(NETLOGON_SAM_LOGON_RESPONSE_NT40, &response->nt4);
+ }
+
} else if (ntver & NETLOGON_NT_VERSION_5EX) {
struct ndr_pull *ndr;
ndr = ndr_pull_init_blob(data, mem_ctx, iconv_convenience);
@@ -95,6 +99,9 @@ NTSTATUS pull_netlogon_samlogon_response(DATA_BLOB *data, TALLOC_CTX *mem_ctx,
ndr->offset, ndr->data_size);
}
response->ntver = NETLOGON_NT_VERSION_5EX;
+ if (NDR_ERR_CODE_IS_SUCCESS(ndr_err) && DEBUGLEVEL >= 10) {
+ NDR_PRINT_DEBUG(NETLOGON_SAM_LOGON_RESPONSE_EX, &response->nt5_ex);
+ }
} else if (ntver & NETLOGON_NT_VERSION_5) {
ndr_err = ndr_pull_struct_blob_all(data, mem_ctx,
@@ -102,6 +109,9 @@ NTSTATUS pull_netlogon_samlogon_response(DATA_BLOB *data, TALLOC_CTX *mem_ctx,
&response->nt5,
(ndr_pull_flags_fn_t)ndr_pull_NETLOGON_SAM_LOGON_RESPONSE);
response->ntver = NETLOGON_NT_VERSION_5;
+ if (NDR_ERR_CODE_IS_SUCCESS(ndr_err) && DEBUGLEVEL >= 10) {
+ NDR_PRINT_DEBUG(NETLOGON_SAM_LOGON_RESPONSE, &response->nt5);
+ }
} else {
DEBUG(2,("failed to parse netlogon response of type 0x%02x - unknown response type\n",
ntver));
@@ -115,6 +125,7 @@ NTSTATUS pull_netlogon_samlogon_response(DATA_BLOB *data, TALLOC_CTX *mem_ctx,
dump_data(10, data->data, data->length);
return ndr_map_error2ntstatus(ndr_err);
}
+
return NT_STATUS_OK;
}