summaryrefslogtreecommitdiff
path: root/source4/torture/rpc
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-11-18 01:18:24 +0000
committerAndrew Tridgell <tridge@samba.org>2003-11-18 01:18:24 +0000
commit2c0a7165efb1ce52be27bd13496e99c5e5c70e48 (patch)
treea959c8bdd0ac3bb0378d91bbfe68a16858bbc6dc /source4/torture/rpc
parent7b185ccb32d685c00ddca9495fafe34bec59ceb3 (diff)
downloadsamba-2c0a7165efb1ce52be27bd13496e99c5e5c70e48.tar.gz
samba-2c0a7165efb1ce52be27bd13496e99c5e5c70e48.tar.bz2
samba-2c0a7165efb1ce52be27bd13496e99c5e5c70e48.zip
* use the new auto-generated debug code method.
* add a couple more info levels to wkssvc (This used to be commit c69161bdb13745f271b0cfa9a9af349f7a95edc6)
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r--source4/torture/rpc/dfs.c8
-rw-r--r--source4/torture/rpc/echo.c5
-rw-r--r--source4/torture/rpc/lsa.c24
-rw-r--r--source4/torture/rpc/samr.c24
-rw-r--r--source4/torture/rpc/spoolss.c4
-rw-r--r--source4/torture/rpc/wkssvc.c21
6 files changed, 20 insertions, 66 deletions
diff --git a/source4/torture/rpc/dfs.c b/source4/torture/rpc/dfs.c
index 889abbdc78..7d851675e0 100644
--- a/source4/torture/rpc/dfs.c
+++ b/source4/torture/rpc/dfs.c
@@ -36,8 +36,6 @@ static BOOL test_Exist(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
return False;
}
- NDR_PRINT_BOTH_DEBUG(dfs_Exist, &r);
-
return True;
}
@@ -60,8 +58,6 @@ static BOOL test_InfoLevel(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, uint16 le
return False;
}
- NDR_PRINT_BOTH_DEBUG(dfs_GetInfo, &r);
-
return True;
}
@@ -106,8 +102,6 @@ static BOOL test_EnumLevel(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, uint16 le
return False;
}
- NDR_PRINT_BOTH_DEBUG(dfs_Enum, &r);
-
if (level == 1 && r.out.total) {
int i;
for (i=0;i<*r.out.total;i++) {
@@ -182,6 +176,8 @@ BOOL torture_rpc_dfs(int dummy)
if (!NT_STATUS_IS_OK(status)) {
return False;
}
+
+ p->flags |= DCERPC_DEBUG_PRINT_BOTH;
if (!test_Exist(p, mem_ctx)) {
ret = False;
diff --git a/source4/torture/rpc/echo.c b/source4/torture/rpc/echo.c
index 3ae0c76a74..3e674a21b8 100644
--- a/source4/torture/rpc/echo.c
+++ b/source4/torture/rpc/echo.c
@@ -198,11 +198,6 @@ BOOL torture_rpc_echo(int dummy)
return False;
}
- if (!test_testcall(p, mem_ctx)) {
- ret = False;
- }
- return ret;
-
if (!test_addone(p, mem_ctx)) {
ret = False;
}
diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c
index bcefde24d9..e810ffa585 100644
--- a/source4/torture/rpc/lsa.c
+++ b/source4/torture/rpc/lsa.c
@@ -134,8 +134,6 @@ static BOOL test_LookupNames(struct dcerpc_pipe *p,
return False;
}
- NDR_PRINT_BOTH_DEBUG(lsa_LookupNames, &r);
-
printf("\n");
return True;
@@ -171,8 +169,6 @@ static BOOL test_LookupSids(struct dcerpc_pipe *p,
return False;
}
- NDR_PRINT_BOTH_DEBUG(lsa_LookupSids, &r);
-
printf("\n");
if (!test_LookupNames(p, mem_ctx, handle, &names)) {
@@ -199,8 +195,6 @@ static BOOL test_LookupPrivName(struct dcerpc_pipe *p,
return False;
}
- NDR_PRINT_BOTH_DEBUG(lsa_LookupPrivName, &r);
-
return True;
}
@@ -222,8 +216,6 @@ static BOOL test_EnumPrivsAccount(struct dcerpc_pipe *p,
return False;
}
- NDR_PRINT_BOTH_DEBUG(lsa_EnumPrivsAccount, &r);
-
if (r.out.privs) {
int i;
for (i=0;i<r.out.privs->count;i++) {
@@ -256,8 +248,6 @@ static BOOL test_EnumAccountRights(struct dcerpc_pipe *p,
return False;
}
- NDR_PRINT_BOTH_DEBUG(lsa_EnumAccountRights, &r);
-
return True;
}
@@ -281,8 +271,6 @@ static BOOL test_QuerySecObj(struct dcerpc_pipe *p,
return False;
}
- NDR_PRINT_BOTH_DEBUG(lsa_QuerySecObj, &r);
-
return True;
}
@@ -344,8 +332,6 @@ static BOOL test_EnumAccounts(struct dcerpc_pipe *p,
return False;
}
- NDR_PRINT_BOTH_DEBUG(lsa_EnumAccounts, &r);
-
if (!test_LookupSids(p, mem_ctx, handle, &sids1)) {
return False;
}
@@ -372,8 +358,6 @@ static BOOL test_EnumAccounts(struct dcerpc_pipe *p,
return False;
}
- NDR_PRINT_BOTH_DEBUG(lsa_EnumAccounts, &r);
-
if (sids2.num_sids != 1) {
printf("Returned wrong number of entries (%d)\n", sids2.num_sids);
return False;
@@ -407,8 +391,6 @@ static BOOL test_EnumPrivs(struct dcerpc_pipe *p,
return False;
}
- NDR_PRINT_BOTH_DEBUG(lsa_EnumPrivs, &r);
-
return True;
}
@@ -436,8 +418,6 @@ static BOOL test_EnumTrustDom(struct dcerpc_pipe *p,
return False;
}
- NDR_PRINT_BOTH_DEBUG(lsa_EnumTrustDom, &r);
-
return True;
}
@@ -464,8 +444,6 @@ static BOOL test_QueryInfoPolicy(struct dcerpc_pipe *p,
ret = False;
continue;
}
-
- NDR_PRINT_BOTH_DEBUG(lsa_QueryInfoPolicy, &r);
}
return ret;
@@ -538,6 +516,8 @@ BOOL torture_rpc_lsa(int dummy)
return False;
}
+ p->flags |= DCERPC_DEBUG_PRINT_BOTH;
+
if (!test_OpenPolicy(p, mem_ctx)) {
ret = False;
}
diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c
index 60c55f01be..fb00cc56df 100644
--- a/source4/torture/rpc/samr.c
+++ b/source4/torture/rpc/samr.c
@@ -30,16 +30,12 @@ static BOOL test_Close(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
r.in.handle = handle;
r.out.handle = handle;
- NDR_PRINT_IN_DEBUG(samr_Close, &r);
-
status = dcerpc_samr_Close(p, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
printf("Close handle failed - %s\n", nt_errstr(status));
return False;
}
- NDR_PRINT_OUT_DEBUG(samr_Close, &r);
-
return True;
}
@@ -66,8 +62,6 @@ static BOOL test_QueryAliasInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
levels[i], nt_errstr(status));
ret = False;
}
-
- NDR_PRINT_BOTH_DEBUG(samr_QueryAliasInfo, &r);
}
return ret;
@@ -94,8 +88,6 @@ static BOOL test_QueryGroupInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
levels[i], nt_errstr(status));
ret = False;
}
-
- NDR_PRINT_BOTH_DEBUG(samr_QueryGroupInfo, &r);
}
return ret;
@@ -123,8 +115,6 @@ static BOOL test_QueryUserInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
levels[i], nt_errstr(status));
ret = False;
}
-
- NDR_PRINT_BOTH_DEBUG(samr_QueryUserInfo, &r);
}
return ret;
@@ -249,8 +239,6 @@ static BOOL test_EnumDomainUsers(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
return False;
}
- NDR_PRINT_BOTH_DEBUG(samr_EnumDomainUsers, &r);
-
if (!r.out.sam) {
return False;
}
@@ -286,8 +274,6 @@ static BOOL test_EnumDomainGroups(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
return False;
}
- NDR_PRINT_BOTH_DEBUG(samr_EnumDomainGroups, &r);
-
if (!r.out.sam) {
return False;
}
@@ -323,8 +309,6 @@ static BOOL test_EnumDomainAliases(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
return False;
}
- NDR_PRINT_BOTH_DEBUG(samr_EnumDomainAliases, &r);
-
if (!r.out.sam) {
return False;
}
@@ -360,8 +344,6 @@ static BOOL test_QueryDomainInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
ret = False;
continue;
}
-
- NDR_PRINT_BOTH_DEBUG(samr_QueryDomainInfo, &r);
}
return True;
@@ -428,8 +410,6 @@ static BOOL test_LookupDomain(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
return False;
}
- NDR_PRINT_BOTH_DEBUG(samr_LookupDomain, &r);
-
if (!test_OpenDomain(p, mem_ctx, handle, r.out.sid)) {
return False;
}
@@ -460,8 +440,6 @@ static BOOL test_EnumDomains(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
return False;
}
- NDR_PRINT_BOTH_DEBUG(samr_EnumDomains, &r);
-
if (!r.out.sam) {
return False;
}
@@ -524,6 +502,8 @@ BOOL torture_rpc_samr(int dummy)
return False;
}
+ p->flags |= DCERPC_DEBUG_PRINT_BOTH;
+
if (!test_Connect(p, mem_ctx, &handle)) {
ret = False;
}
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index df001e7721..feaeae7b79 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -61,8 +61,6 @@ BOOL test_GetPrinter(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
ret = False;
continue;
}
-
- NDR_PRINT_FUNCTION_DEBUG(spoolss_GetPrinter, NDR_BOTH, &r);
}
return ret;
@@ -267,6 +265,8 @@ BOOL torture_rpc_spoolss(int dummy)
if (!NT_STATUS_IS_OK(status)) {
return False;
}
+
+ p->flags |= DCERPC_DEBUG_PRINT_BOTH;
if (!test_EnumPrinters(p, mem_ctx)) {
ret = False;
diff --git a/source4/torture/rpc/wkssvc.c b/source4/torture/rpc/wkssvc.c
index 436062fafe..73b3f5c527 100644
--- a/source4/torture/rpc/wkssvc.c
+++ b/source4/torture/rpc/wkssvc.c
@@ -27,20 +27,21 @@ static BOOL test_QueryInfo(struct dcerpc_pipe *p,
{
NTSTATUS status;
struct wks_QueryInfo r;
-
- printf("testing QueryInfo\n");
+ uint16 levels[] = {100, 101, 102};
+ int i;
r.in.server_name = dcerpc_server_name(p);
- r.in.level = 100;
- status = dcerpc_wks_QueryInfo(p, mem_ctx, &r);
- if (!NT_STATUS_IS_OK(status)) {
- printf("QueryInfo failed - %s\n", nt_errstr(status));
- return False;
+ for (i=0;i<ARRAY_SIZE(levels);i++) {
+ r.in.level = levels[i];
+ printf("testing QueryInfo level %u\n", r.in.level);
+ status = dcerpc_wks_QueryInfo(p, mem_ctx, &r);
+ if (!NT_STATUS_IS_OK(status)) {
+ printf("QueryInfo level %u failed - %s\n", r.in.level, nt_errstr(status));
+ return False;
+ }
}
- NDR_PRINT_BOTH_DEBUG(wks_QueryInfo, &r);
-
return True;
}
@@ -57,6 +58,8 @@ BOOL torture_rpc_wkssvc(int dummy)
if (!NT_STATUS_IS_OK(status)) {
return False;
}
+
+ p->flags |= DCERPC_DEBUG_PRINT_BOTH;
if (!test_QueryInfo(p, mem_ctx)) {
ret = False;