return true;
}
+static bool test_GetLogInformation(struct torture_context *tctx,
+ struct dcerpc_pipe *p)
+{
+ NTSTATUS status;
+ struct eventlog_GetLogIntormation r;
+ struct eventlog_CloseEventLog cr;
+ struct policy_handle handle;
+ uint32_t bytes_needed = 0;
+
+ if (!get_policy_handle(tctx, p, &handle))
+ return false;
+
+ r.in.handle = &handle;
+ r.in.level = 1;
+ r.in.buf_size = 0;
+ r.out.buffer = NULL;
+ r.out.bytes_needed = &bytes_needed;
+
+ status = dcerpc_eventlog_GetLogIntormation(p, tctx, &r);
+
+ torture_assert_ntstatus_equal(tctx, status, NT_STATUS_INVALID_LEVEL,
+ "GetLogInformation failed");
+
+ r.in.level = 0;
+
+ status = dcerpc_eventlog_GetLogIntormation(p, tctx, &r);
+
+ torture_assert_ntstatus_equal(tctx, status, NT_STATUS_BUFFER_TOO_SMALL,
+ "GetLogInformation failed");
+
+ r.in.buf_size = bytes_needed;
+ r.out.buffer = talloc_array(tctx, uint8_t, bytes_needed);
+
+ status = dcerpc_eventlog_GetLogIntormation(p, tctx, &r);
+
+ torture_assert_ntstatus_ok(tctx, status, "GetLogInformation failed");
+
+ cr.in.handle = cr.out.handle = &handle;
+
+ torture_assert_ntstatus_ok(tctx,
+ dcerpc_eventlog_CloseEventLog(p, tctx, &cr),
+ "CloseEventLog failed");
+
+ return true;
+}
+
+
static bool test_OpenEventLog(struct torture_context *tctx,
struct dcerpc_pipe *p)
{
torture_rpc_tcase_add_test(tcase, "ReadEventLog", test_ReadEventLog);
torture_rpc_tcase_add_test(tcase, "ReportEventLog", test_ReportEventLog);
torture_rpc_tcase_add_test(tcase, "FlushEventLog", test_FlushEventLog);
+ torture_rpc_tcase_add_test(tcase, "GetLogIntormation", test_GetLogInformation);
return suite;
}