summaryrefslogtreecommitdiff
path: root/source4/torture/rpc/lsa.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-11-11 02:02:29 +0000
committerAndrew Tridgell <tridge@samba.org>2003-11-11 02:02:29 +0000
commita934f89549b3d23199d68b7dc3fc3ad16e86b9ad (patch)
tree0443067094f28b9a339a1b3875bf3cc00be5a45e /source4/torture/rpc/lsa.c
parentbe443f914af377fc97d4cfd56f13d95edbcc645f (diff)
downloadsamba-a934f89549b3d23199d68b7dc3fc3ad16e86b9ad.tar.gz
samba-a934f89549b3d23199d68b7dc3fc3ad16e86b9ad.tar.bz2
samba-a934f89549b3d23199d68b7dc3fc3ad16e86b9ad.zip
started adding support for lsa_QueryInfoPolicy
(This used to be commit 5b2d577969103ed5c633ea993d476787af14fa93)
Diffstat (limited to 'source4/torture/rpc/lsa.c')
-rw-r--r--source4/torture/rpc/lsa.c35
1 files changed, 35 insertions, 0 deletions
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)) {