From: Günther Deschner Date: Tue, 13 Jan 2009 13:44:29 +0000 (+0100) Subject: s4-smbtorture: also test for invalid flags in eventlog test_ReadEventLog. X-Git-Tag: samba-4.0.0alpha6~116 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=af9f7a39f0e641df6a0c84e90261fe626e585ed8;p=thirdparty%2Fsamba.git s4-smbtorture: also test for invalid flags in eventlog test_ReadEventLog. Guenther --- diff --git a/source4/torture/rpc/eventlog.c b/source4/torture/rpc/eventlog.c index 7c3cb0ef463..7d880908b6b 100644 --- a/source4/torture/rpc/eventlog.c +++ b/source4/torture/rpc/eventlog.c @@ -107,7 +107,12 @@ static bool test_ReadEventLog(struct torture_context *tctx, ZERO_STRUCT(r); r.in.offset = 0; r.in.handle = &handle; - r.in.flags = EVENTLOG_BACKWARDS_READ|EVENTLOG_SEQUENTIAL_READ; + r.in.flags = 0; + + status = dcerpc_eventlog_ReadEventLogW(p, tctx, &r); + + torture_assert_ntstatus_equal(tctx, r.out.result, NT_STATUS_INVALID_PARAMETER, + "ReadEventLog failed"); while (1) { DATA_BLOB blob; @@ -120,6 +125,7 @@ static bool test_ReadEventLog(struct torture_context *tctx, /* Read first for number of bytes in record */ r.in.number_of_bytes = 0; + r.in.flags = EVENTLOG_BACKWARDS_READ|EVENTLOG_SEQUENTIAL_READ; r.out.data = NULL; r.out.sent_size = &sent_size; r.out.real_size = &real_size;