s4-smbtorture: fix GetAliasMembership test in RPC-SAMR.
authorGünther Deschner <gd@samba.org>
Mon, 11 Jan 2010 11:40:01 +0000 (12:40 +0100)
committerGünther Deschner <gd@samba.org>
Tue, 12 Jan 2010 11:12:05 +0000 (12:12 +0100)
Guenther

source4/torture/rpc/samr.c

index 20d48038e74959bdf2e12662607e7449792f9daf..8b466e8ef014770f351c0294a3e7b089368218b5 100644 (file)
@@ -2639,11 +2639,13 @@ static bool test_GetAliasMembership(struct dcerpc_pipe *p,
        /* only true for w2k8 it seems
         * win7, xp, w2k3 will return a 0 length array pointer */
 
-       torture_assert(tctx, (rids.ids && !rids.count),
-               "samr_GetAliasMembership protocol misbehaviour");
+       if (rids.ids && (rids.count == 0)) {
+               torture_fail(tctx, "samr_GetAliasMembership returned 0 count and a rids array");
+       }
 #endif
-       torture_assert(tctx, (!rids.ids && rids.count),
-               "samr_GetAliasMembership protocol misbehaviour");
+       if (!rids.ids && rids.count) {
+               torture_fail(tctx, "samr_GetAliasMembership returned non-0 count but no rids");
+       }
 
        return true;
 }