diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-11-17 11:55:56 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-11-17 11:55:56 +0000 |
commit | d285c6f14f7ad7037e1a81d59da8b3c892a49884 (patch) | |
tree | 07c6ac5184aef953d5cf82b653f9f56dd6942cfd /source4/torture | |
parent | fb53302c8eb32603098b17bcf2fad16af66e9a60 (diff) | |
download | samba-d285c6f14f7ad7037e1a81d59da8b3c892a49884.tar.gz samba-d285c6f14f7ad7037e1a81d59da8b3c892a49884.tar.bz2 samba-d285c6f14f7ad7037e1a81d59da8b3c892a49884.zip |
* add another WERR err code
* use the top-level function argument printing to show more detail in
RPC-* tests
(This used to be commit 33bb8785625b1845750f28f2d810e7096afe9f8e)
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/rpc/dfs.c | 8 | ||||
-rw-r--r-- | source4/torture/rpc/lsa.c | 40 | ||||
-rw-r--r-- | source4/torture/rpc/samr.c | 22 | ||||
-rw-r--r-- | source4/torture/rpc/spoolss.c | 2 |
4 files changed, 28 insertions, 44 deletions
diff --git a/source4/torture/rpc/dfs.c b/source4/torture/rpc/dfs.c index 77de4017d4..889abbdc78 100644 --- a/source4/torture/rpc/dfs.c +++ b/source4/torture/rpc/dfs.c @@ -36,7 +36,7 @@ static BOOL test_Exist(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx) return False; } - printf("exist=%d\n", exist); + NDR_PRINT_BOTH_DEBUG(dfs_Exist, &r); return True; } @@ -60,7 +60,7 @@ static BOOL test_InfoLevel(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, uint16 le return False; } - NDR_PRINT_UNION_DEBUG(dfs_Info, r.in.level, &r.out.info); + NDR_PRINT_BOTH_DEBUG(dfs_GetInfo, &r); return True; } @@ -106,9 +106,7 @@ static BOOL test_EnumLevel(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, uint16 le return False; } - printf("Received %d records\n", r.out.total?*r.out.total:-1); - - NDR_PRINT_DEBUG(dfs_EnumStruct, r.out.info); + NDR_PRINT_BOTH_DEBUG(dfs_Enum, &r); if (level == 1 && r.out.total) { int i; diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c index f65f49bafd..bcefde24d9 100644 --- a/source4/torture/rpc/lsa.c +++ b/source4/torture/rpc/lsa.c @@ -134,13 +134,7 @@ static BOOL test_LookupNames(struct dcerpc_pipe *p, return False; } - if (r.out.domains) { - NDR_PRINT_DEBUG(lsa_RefDomainList, r.out.domains); - } - - printf("lookup gave %d sids (sids.count=%d)\n", count, sids.count); - - NDR_PRINT_DEBUG(lsa_TransSidArray, r.out.sids); + NDR_PRINT_BOTH_DEBUG(lsa_LookupNames, &r); printf("\n"); @@ -177,11 +171,7 @@ static BOOL test_LookupSids(struct dcerpc_pipe *p, return False; } - if (r.out.domains) { - NDR_PRINT_DEBUG(lsa_RefDomainList, r.out.domains); - } - - NDR_PRINT_DEBUG(lsa_TransNameArray, r.out.names); + NDR_PRINT_BOTH_DEBUG(lsa_LookupSids, &r); printf("\n"); @@ -209,7 +199,7 @@ static BOOL test_LookupPrivName(struct dcerpc_pipe *p, return False; } - NDR_PRINT_DEBUG(lsa_Name, r.out.name); + NDR_PRINT_BOTH_DEBUG(lsa_LookupPrivName, &r); return True; } @@ -232,12 +222,10 @@ static BOOL test_EnumPrivsAccount(struct dcerpc_pipe *p, return False; } - printf("received %d privileges\n", - r.out.privs?r.out.privs->count:0); + NDR_PRINT_BOTH_DEBUG(lsa_EnumPrivsAccount, &r); if (r.out.privs) { int i; - NDR_PRINT_DEBUG(lsa_PrivilegeSet, r.out.privs); for (i=0;i<r.out.privs->count;i++) { test_LookupPrivName(p, mem_ctx, handle, &r.out.privs->set[i].luid); @@ -268,7 +256,7 @@ static BOOL test_EnumAccountRights(struct dcerpc_pipe *p, return False; } - NDR_PRINT_DEBUG(lsa_RightSet, r.out.rights); + NDR_PRINT_BOTH_DEBUG(lsa_EnumAccountRights, &r); return True; } @@ -293,7 +281,7 @@ static BOOL test_QuerySecObj(struct dcerpc_pipe *p, return False; } - NDR_PRINT_DEBUG(sec_desc_buf, r.out.sd); + NDR_PRINT_BOTH_DEBUG(lsa_QuerySecObj, &r); return True; } @@ -356,9 +344,7 @@ static BOOL test_EnumAccounts(struct dcerpc_pipe *p, return False; } - printf("Got %d sids resume_handle=%u\n", sids1.num_sids, resume_handle); - - NDR_PRINT_DEBUG(lsa_SidArray, r.out.sids); + NDR_PRINT_BOTH_DEBUG(lsa_EnumAccounts, &r); if (!test_LookupSids(p, mem_ctx, handle, &sids1)) { return False; @@ -386,7 +372,7 @@ static BOOL test_EnumAccounts(struct dcerpc_pipe *p, return False; } - NDR_PRINT_DEBUG(lsa_SidArray, r.out.sids); + NDR_PRINT_BOTH_DEBUG(lsa_EnumAccounts, &r); if (sids2.num_sids != 1) { printf("Returned wrong number of entries (%d)\n", sids2.num_sids); @@ -421,9 +407,7 @@ static BOOL test_EnumPrivs(struct dcerpc_pipe *p, return False; } - printf("Got %d privs resume_handle=%u\n", privs1.count, resume_handle); - - NDR_PRINT_DEBUG(lsa_PrivArray, r.out.privs); + NDR_PRINT_BOTH_DEBUG(lsa_EnumPrivs, &r); return True; } @@ -452,9 +436,7 @@ static BOOL test_EnumTrustDom(struct dcerpc_pipe *p, return False; } - printf("lookup gave %d domains\n", domains.count); - - NDR_PRINT_DEBUG(lsa_DomainList, r.out.domains); + NDR_PRINT_BOTH_DEBUG(lsa_EnumTrustDom, &r); return True; } @@ -483,7 +465,7 @@ static BOOL test_QueryInfoPolicy(struct dcerpc_pipe *p, continue; } - NDR_PRINT_UNION_DEBUG(lsa_PolicyInformation, r.in.level, r.out.info); + NDR_PRINT_BOTH_DEBUG(lsa_QueryInfoPolicy, &r); } return ret; diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c index bfabd01149..60c55f01be 100644 --- a/source4/torture/rpc/samr.c +++ b/source4/torture/rpc/samr.c @@ -30,12 +30,16 @@ 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; } @@ -63,7 +67,7 @@ static BOOL test_QueryAliasInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, ret = False; } - NDR_PRINT_UNION_DEBUG(samr_AliasInfo, r.in.level, r.out.info); + NDR_PRINT_BOTH_DEBUG(samr_QueryAliasInfo, &r); } return ret; @@ -91,7 +95,7 @@ static BOOL test_QueryGroupInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, ret = False; } - NDR_PRINT_UNION_DEBUG(samr_GroupInfo, r.in.level, r.out.info); + NDR_PRINT_BOTH_DEBUG(samr_QueryGroupInfo, &r); } return ret; @@ -120,7 +124,7 @@ static BOOL test_QueryUserInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, ret = False; } - NDR_PRINT_UNION_DEBUG(samr_UserInfo, r.in.level, r.out.info); + NDR_PRINT_BOTH_DEBUG(samr_QueryUserInfo, &r); } return ret; @@ -245,7 +249,7 @@ static BOOL test_EnumDomainUsers(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, return False; } - NDR_PRINT_DEBUG(samr_SamArray, r.out.sam); + NDR_PRINT_BOTH_DEBUG(samr_EnumDomainUsers, &r); if (!r.out.sam) { return False; @@ -282,7 +286,7 @@ static BOOL test_EnumDomainGroups(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, return False; } - NDR_PRINT_DEBUG(samr_SamArray, r.out.sam); + NDR_PRINT_BOTH_DEBUG(samr_EnumDomainGroups, &r); if (!r.out.sam) { return False; @@ -319,7 +323,7 @@ static BOOL test_EnumDomainAliases(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, return False; } - NDR_PRINT_DEBUG(samr_SamArray, r.out.sam); + NDR_PRINT_BOTH_DEBUG(samr_EnumDomainAliases, &r); if (!r.out.sam) { return False; @@ -357,7 +361,7 @@ static BOOL test_QueryDomainInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, continue; } - NDR_PRINT_UNION_DEBUG(samr_DomainInfo, r.in.level, r.out.info); + NDR_PRINT_BOTH_DEBUG(samr_QueryDomainInfo, &r); } return True; @@ -424,7 +428,7 @@ static BOOL test_LookupDomain(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, return False; } - NDR_PRINT_DEBUG(dom_sid2, r.out.sid); + NDR_PRINT_BOTH_DEBUG(samr_LookupDomain, &r); if (!test_OpenDomain(p, mem_ctx, handle, r.out.sid)) { return False; @@ -456,7 +460,7 @@ static BOOL test_EnumDomains(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, return False; } - NDR_PRINT_DEBUG(samr_SamArray, r.out.sam); + NDR_PRINT_BOTH_DEBUG(samr_EnumDomains, &r); if (!r.out.sam) { return False; diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c index 895677eba3..df001e7721 100644 --- a/source4/torture/rpc/spoolss.c +++ b/source4/torture/rpc/spoolss.c @@ -62,7 +62,7 @@ BOOL test_GetPrinter(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, continue; } - NDR_PRINT_UNION_DEBUG(spoolss_PrinterInfo, r.in.level, r.out.info); + NDR_PRINT_FUNCTION_DEBUG(spoolss_GetPrinter, NDR_BOTH, &r); } return ret; |