]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
selftest: Merge alternate error codes into backupkey from backupkey_heimdal
authorAndrew Bartlett <abartlet@samba.org>
Tue, 2 Aug 2016 01:20:46 +0000 (13:20 +1200)
committerStefan Metzmacher <metze@samba.org>
Wed, 3 Aug 2016 19:43:21 +0000 (21:43 +0200)
This is from cea4a4b9b22c78f9736e2290d302a88644db4031 and
613d085a63ee554084cb99d2150921dd108f6b77

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>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Aug  3 21:43:21 CEST 2016 on sn-devel-144

source4/torture/rpc/backupkey.c

index ca981c25943cbda5a7152dc8c67bdafb4ddab39e..276fa7f58f342a2475815e075c5753bf766e11f5 100644 (file)
@@ -2217,10 +2217,12 @@ static bool test_ServerWrap_decrypt_wrong_stuff(struct torture_context *tctx,
                                          WERR_INVALID_ACCESS,
                                          "decrypt should fail with WERR_INVALID_ACCESS");
        } else {
-               torture_assert_werr_equal(tctx,
-                                         r.out.result,
-                                         WERR_INVALID_PARAM,
-                                         "decrypt should fail with 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_ACCESS, WERR_INVALID_PARAM or WERR_INVALID_DATA");
+               }
        }
 
        /* Decrypt */