]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
selftest: allow any kdc error in mitm-s4u2self test
authorIsaac Boukris <iboukris@gmail.com>
Sat, 16 Nov 2019 21:46:19 +0000 (22:46 +0100)
committerIsaac Boukris <iboukris@sn-devel-184>
Tue, 19 Nov 2019 14:48:41 +0000 (14:48 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14202

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/torture/krb5/kdc-canon-heimdal.c

index 8dc3e24a8d53b15a400d1da2b18dc1e00e75d655..700e1c2b37e5d4e6b938b0d4ea0a6073e10a1d58 100644 (file)
@@ -737,13 +737,12 @@ static bool torture_krb5_post_recv_tgs_req_canon_test(struct torture_krb5_contex
                                         error.pvno, 5,
                                         "Got wrong error.pvno");
                expected_error = KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN - KRB5KDC_ERR_NONE;
-               if (error.error_code != expected_error && test_context->test_data->mitm_s4u2self) {
-                       expected_error = KRB5KRB_AP_ERR_INAPP_CKSUM - KRB5KDC_ERR_NONE;
+               if (!test_context->test_data->mitm_s4u2self) {
+                       torture_assert_int_equal(test_context->tctx,
+                                                error.error_code,
+                                                expected_error,
+                                                "Got wrong error.error_code");
                }
-               torture_assert_int_equal(test_context->tctx,
-                                        error.error_code,
-                                        expected_error,
-                                        "Got wrong error.error_code");
        } else {
                torture_assert_int_equal(test_context->tctx,
                                         decode_TGS_REP(recv_buf->data, recv_buf->length,
@@ -2090,8 +2089,7 @@ static bool torture_krb5_as_req_canon(struct torture_context *tctx, const void *
                        || test_data->upn == false)) {
 
                        if (test_data->mitm_s4u2self) {
-                               torture_assert_int_equal(tctx, k5ret, KRB5KRB_AP_ERR_INAPP_CKSUM,
-                                                        assertion_message);
+                               torture_assert_int_not_equal(tctx, k5ret, 0, assertion_message);
                                /* Done testing mitm-s4u2self */
                                return true;
                        }