summaryrefslogtreecommitdiff
path: root/source4/torture/rpc/lsa.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-11-17 11:55:56 +0000
committerAndrew Tridgell <tridge@samba.org>2003-11-17 11:55:56 +0000
commitd285c6f14f7ad7037e1a81d59da8b3c892a49884 (patch)
tree07c6ac5184aef953d5cf82b653f9f56dd6942cfd /source4/torture/rpc/lsa.c
parentfb53302c8eb32603098b17bcf2fad16af66e9a60 (diff)
downloadsamba-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/rpc/lsa.c')
-rw-r--r--source4/torture/rpc/lsa.c40
1 files changed, 11 insertions, 29 deletions
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;