diff options
author | Günther Deschner <gd@samba.org> | 2009-10-20 15:00:55 +0200 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2009-11-26 11:39:36 +0100 |
commit | 4fb62be8e296487078247269f31cc40e493757f3 (patch) | |
tree | df98ccca6ced6319274010e4e6647882f1f931ec /source4 | |
parent | d9ed23936bf8d1fcc870ac573379c6f3991d1c45 (diff) | |
download | samba-4fb62be8e296487078247269f31cc40e493757f3.tar.gz samba-4fb62be8e296487078247269f31cc40e493757f3.tar.xz samba-4fb62be8e296487078247269f31cc40e493757f3.zip |
s4-smbtorture: add stricter tests for LSA-LOOKUPNAMES replies.
Guenther
(cherry picked from commit d76e77ce9a72543727ff83eacbefed22f0c644b9)
(cherry picked from commit 0bf4f0bfecc6ec06187aafaabc0fbace4de3fddc)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/torture/rpc/lsa.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c index 0ce75d8a86b..7b938f399ca 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"); |