From a934f89549b3d23199d68b7dc3fc3ad16e86b9ad Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 11 Nov 2003 02:02:29 +0000 Subject: started adding support for lsa_QueryInfoPolicy (This used to be commit 5b2d577969103ed5c633ea993d476787af14fa93) --- source4/torture/rpc/lsa.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'source4/torture') diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c index 8dd18042f0..ca8c25bdd6 100644 --- a/source4/torture/rpc/lsa.c +++ b/source4/torture/rpc/lsa.c @@ -528,6 +528,37 @@ static BOOL test_EnumTrustDom(struct dcerpc_pipe *p, return True; } +static BOOL test_QueryInfoPolicy(struct dcerpc_pipe *p, + TALLOC_CTX *mem_ctx, + struct policy_handle *handle) +{ + struct lsa_QueryInfoPolicy r; + NTSTATUS status; + + printf("\nTesting QueryInfoPolicy\n"); + + r.in.handle = handle; + r.in.level = 1; + + status = dcerpc_lsa_QueryInfoPolicy(p, mem_ctx, &r); + if (!NT_STATUS_IS_OK(status)) { + printf("QueryInfoPolicy failed - %s\n", nt_errstr(status)); + return False; + } + + { + struct lsa_AuditLogInfo *u = &r.out.info->audit_log; + printf("percent_full=%d log_size=%d retention_time=%s\n", + u->percent_full, u->log_size, + nt_time_string(mem_ctx, &u->retention_time)); + printf("shutdown_in_progress=%d time_to_shutdown=%s next_audit_record=%d unknown=0x%x\n", + u->shutdown_in_progress, nt_time_string(mem_ctx, &u->time_to_shutdown), + u->next_audit_record, u->unknown); + } + + return True; +} + static BOOL test_Delete(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct policy_handle *handle) @@ -614,6 +645,10 @@ BOOL torture_rpc_lsa(int dummy) if (!test_EnumTrustDom(p, mem_ctx, &handle)) { ret = False; } + + if (!test_QueryInfoPolicy(p, mem_ctx, &handle)) { + ret = False; + } #if 0 if (!test_Delete(p, mem_ctx, &handle)) { -- cgit