summaryrefslogtreecommitdiff
path: root/source4/torture/rpc
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-10-20 15:00:55 +0200
committerGünther Deschner <gd@samba.org>2009-10-20 15:28:30 +0200
commitd76e77ce9a72543727ff83eacbefed22f0c644b9 (patch)
tree92766453a4b0e8718a078fca72a775f51e3881d0 /source4/torture/rpc
parent80b512fe03e692f630375c39f84ae9f91f5b333a (diff)
downloadsamba-d76e77ce9a72543727ff83eacbefed22f0c644b9.tar.gz
samba-d76e77ce9a72543727ff83eacbefed22f0c644b9.tar.bz2
samba-d76e77ce9a72543727ff83eacbefed22f0c644b9.zip
s4-smbtorture: add stricter tests for LSA-LOOKUPNAMES replies.
Guenther
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r--source4/torture/rpc/lsa.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c
index 0ce75d8a86..7b938f399c 100644
--- a/source4/torture/rpc/lsa.c
+++ b/source4/torture/rpc/lsa.c
@@ -202,12 +202,22 @@ static bool test_LookupNames(struct dcerpc_pipe *p,
}
for (i=0;i< tnames->count;i++) {
- if (i < count && sids.sids[i].sid_type != tnames->names[i].sid_type) {
- torture_comment(tctx, "LookupName of %s got unexpected name type: %s\n",
- tnames->names[i].name.string, sid_type_lookup(sids.sids[i].sid_type));
+ if (i < count) {
+ if (sids.sids[i].sid_type != tnames->names[i].sid_type) {
+ torture_comment(tctx, "LookupName of %s got unexpected name type: %s\n",
+ tnames->names[i].name.string, sid_type_lookup(sids.sids[i].sid_type));
+ return false;
+ }
+ if ((sids.sids[i].sid_type == SID_NAME_DOMAIN) &&
+ (sids.sids[i].rid != (uint32_t)-1)) {
+ torture_comment(tctx, "LookupName of %s got unexpected rid: %d\n",
+ tnames->names[i].name.string, sids.sids[i].rid);
+ return false;
+ }
} else if (i >=count) {
torture_comment(tctx, "LookupName of %s failed to return a result\n",
tnames->names[i].name.string);
+ return false;
}
}
torture_comment(tctx, "\n");