s4-smbtorture: also test for invalid flags in eventlog test_ReadEventLog.
authorGünther Deschner <gd@samba.org>
Tue, 13 Jan 2009 13:44:29 +0000 (14:44 +0100)
committerGünther Deschner <gd@samba.org>
Wed, 14 Jan 2009 09:18:13 +0000 (10:18 +0100)
Guenther

source4/torture/rpc/eventlog.c

index 7c3cb0ef463b837dd92a7c7c813205160e8df858..7d880908b6b5420496cb14a3a19a3c6f79f592b7 100644 (file)
@@ -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;