summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2005-08-06 00:47:17 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:31:24 -0500
commit865319a0ec76ce9281ce141487bd926d5480830f (patch)
treede6e3997935cc9e5df21caa31a8503ba52bb4f0e /source4/torture
parent220686a5c10aa54ebda55272edf7a61e0ca79e74 (diff)
downloadsamba-865319a0ec76ce9281ce141487bd926d5480830f.tar.gz
samba-865319a0ec76ce9281ce141487bd926d5480830f.tar.bz2
samba-865319a0ec76ce9281ce141487bd926d5480830f.zip
r9155: Fix ReadEventLog() test so it now works.
(This used to be commit b76d35e7e2207f4da294a7cd1b5636b954162be2)
Diffstat (limited to 'source4/torture')
-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);