summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/rpc/eventlog.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/source4/torture/rpc/eventlog.c b/source4/torture/rpc/eventlog.c
index 1929c4a068..69ed683bc4 100644
--- a/source4/torture/rpc/eventlog.c
+++ b/source4/torture/rpc/eventlog.c
@@ -2,7 +2,7 @@
Unix SMB/CIFS implementation.
test suite for eventlog rpc operations
- Copyright (C) Tim Potter 2003
+ Copyright (C) Tim Potter 2003,2005
Copyright (C) Jelmer Vernooij 2004
This program is free software; you can redistribute it and/or modify
@@ -59,20 +59,13 @@ static BOOL test_ReadEventLog(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct
printf("\ntesting ReadEventLog\n");
- r.in.flags = 0x0;
- r.in.offset = offset;
r.in.handle = handle;
- r.in.number_of_bytes = 0x0;
-
- r.out.data = talloc(mem_ctx, uint8_t);
+ r.in.flags = EVENTLOG_BACKWARDS_READ|EVENTLOG_SEQUENTIAL_READ;
+ r.in.offset = 0;
+ r.in.number_of_bytes = 0;
status = dcerpc_eventlog_ReadEventLogW(p, mem_ctx, &r);
- if (!NT_STATUS_IS_OK(status)) {
- printf("ReadEventLog failed - %s\n", nt_errstr(status));
- return False;
- }
-
if (NT_STATUS_IS_OK(r.out.result)) {
/* No data */
return True;
@@ -84,6 +77,7 @@ static BOOL test_ReadEventLog(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct
}
r.in.number_of_bytes = r.out.real_size;
+ r.out.data = talloc_size(mem_ctx, r.in.number_of_bytes);
status = dcerpc_eventlog_ReadEventLogW(p, mem_ctx, &r);