From 462ef44745d56dbb00b3e31d12d2ecdc9d309219 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 11 Jan 2005 05:16:43 +0000 Subject: r4673: Fix the IDL for the QuerySecret LSA call. This call uses a new IDL type, NTTIME_hyper. This is 8-byte aligned, as the name suggests. Expand the QuerySecret LSA calls in RPC-SAMLOGON and RPC-LSA, to validate the behaviour of times, and of the old secrets. Thanks to tridge for spotting the use of HYPER! Andrew Bartlett (This used to be commit 1fed79cb0f2ae7940639d08ef99576559d4cd06e) --- source4/librpc/ndr/ndr_basic.c | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'source4/librpc/ndr/ndr_basic.c') diff --git a/source4/librpc/ndr/ndr_basic.c b/source4/librpc/ndr/ndr_basic.c index 13ac087978..689483986e 100644 --- a/source4/librpc/ndr/ndr_basic.c +++ b/source4/librpc/ndr/ndr_basic.c @@ -965,7 +965,7 @@ NTSTATUS ndr_push_NTTIME_1sec(struct ndr_push *ndr, NTTIME t) } /* - pull a NTTIME + pull a NTTIME_1sec */ NTSTATUS ndr_pull_NTTIME_1sec(struct ndr_pull *ndr, NTTIME *t) { @@ -974,6 +974,24 @@ NTSTATUS ndr_pull_NTTIME_1sec(struct ndr_pull *ndr, NTTIME *t) return NT_STATUS_OK; } +/* + pull a NTTIME_hyper +*/ +NTSTATUS ndr_pull_NTTIME_hyper(struct ndr_pull *ndr, NTTIME_hyper *t) +{ + NDR_CHECK(ndr_pull_HYPER_T(ndr, t)); + return NT_STATUS_OK; +} + +/* + push a NTTIME_hyper +*/ +NTSTATUS ndr_push_NTTIME_hyper(struct ndr_push *ndr, NTTIME_hyper t) +{ + NDR_CHECK(ndr_push_HYPER_T(ndr, t)); + return NT_STATUS_OK; +} + /* push a time_t */ @@ -1082,7 +1100,12 @@ void ndr_print_NTTIME(struct ndr_print *ndr, const char *name, NTTIME t) ndr->print(ndr, "%-25s: %s", name, nt_time_string(ndr, t)); } -void ndr_print_NTTIME_1sec(struct ndr_print *ndr, const char *name, NTTIME t) +void ndr_print_NTTIME_1sec(struct ndr_print *ndr, const char *name, NTTIME_1sec t) +{ + ndr_print_NTTIME(ndr, name, t * 10000000); +} + +void ndr_print_NTTIME_hyper(struct ndr_print *ndr, const char *name, NTTIME_hyper t) { ndr_print_NTTIME(ndr, name, t); } -- cgit