torture/backupkey: Allow WERR_INVALID_ACCESS, WERR_INVALID_PARAM or WERR_INVALID_DATA
authorAndrew Bartlett <abartlet@samba.org>
Tue, 2 Aug 2016 01:16:35 +0000 (13:16 +1200)
committerStefan Metzmacher <metze@samba.org>
Wed, 3 Aug 2016 16:00:35 +0000 (18:00 +0200)
The use of the wrong key can still create structures that parse as a SID,
therefore we can sometimes get an unusual error, which becomes a flapping test

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12107

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source4/torture/rpc/backupkey_heimdal.c

index c0db48d58cfa297d028c121aa98537d26ff26cfe..370700a6a8fe196e14ef8c639aac3a021e3ff12a 100644 (file)
@@ -1979,10 +1979,11 @@ static bool test_ServerWrap_decrypt_wrong_stuff(struct torture_context *tctx,
                                          WERR_INVALID_ACCESS,
                                          "decrypt should fail with WERR_INVALID_ACCESS");
        } else {
-               if (!W_ERROR_EQUAL(r.out.result, WERR_INVALID_PARAM)) {
+               if (!W_ERROR_EQUAL(r.out.result, WERR_INVALID_ACCESS)
+                   && !W_ERROR_EQUAL(r.out.result, WERR_INVALID_PARAM)) {
                        torture_assert_werr_equal(tctx, r.out.result,
                                                  WERR_INVALID_DATA,
-                                                 "decrypt should fail with WERR_INVALID_PARAM or WERR_INVALID_DATA");
+                                                 "decrypt should fail with WERR_INVALID_ACCESS, WERR_INVALID_PARAM or WERR_INVALID_DATA");
                }
        }