summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorGarming Sam <garming@catalyst.net.nz>2016-03-14 12:02:06 +1300
committerGarming Sam <garming@samba.org>2016-03-14 03:55:16 +0100
commite8e0ffcc495b19b2efa913c0eac4875edfc56c3b (patch)
tree34e0c9b241a0b8d8ce9964e949c84728b546920a /source4
parent6ecfc4cb254f9b2524ec5619ed8cee9db5d959b2 (diff)
downloadsamba-e8e0ffcc495b19b2efa913c0eac4875edfc56c3b.tar.gz
tests: Allow alternative error code for backupkey test
It appears that incorrect decryption triggers a different error code, causing a test which fails every now and again, as sometimes the invalid data will parse as a SID, and so pass one of the checks. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Garming Sam <garming@samba.org> Autobuild-Date(master): Mon Mar 14 03:55:16 CET 2016 on sn-devel-144
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/rpc/backupkey_heimdal.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source4/torture/rpc/backupkey_heimdal.c b/source4/torture/rpc/backupkey_heimdal.c
index d661956e779..32b023529e8 100644
--- a/source4/torture/rpc/backupkey_heimdal.c
+++ b/source4/torture/rpc/backupkey_heimdal.c
@@ -1977,10 +1977,11 @@ 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_PARAM)) {
+ torture_assert_werr_equal(tctx, r.out.result,
+ WERR_INVALID_DATA,
+ "decrypt should fail with WERR_INVALID_PARAM or WERR_INVALID_DATA");
+ }
}
return true;