Skip to content

Commit

Permalink
s4:torture: Adapt KDC canon test to Heimdal upstream changes
Browse files Browse the repository at this point in the history
NOTE: This commit finally works again!

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
  • Loading branch information
jsutton24 authored and Joseph Sutton committed Jan 19, 2022
1 parent a24280d commit 1954e50
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions source4/torture/krb5/kdc-canon-heimdal.c
Original file line number Diff line number Diff line change
Expand Up @@ -747,14 +747,18 @@ static bool torture_krb5_as_req_canon(struct torture_context *tctx, const void *
server_creds),
0, "krb5_free_cred_contents failed");

torture_assert_int_equal(tctx,
test_context->packet_count,
1, "Expected krb5_get_creds to send one packet");

} else {
torture_assert_int_equal(tctx, k5ret, KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN,
assertion_message);
/* Account for get_cred_kdc_capath() and get_cred_kdc_referral() fallback */
torture_assert_int_equal(tctx,
test_context->packet_count,
2, "Expected krb5_get_creds to send 2 packets");
}

torture_assert_int_equal(tctx,
test_context->packet_count,
1, "Expected krb5_get_creds to send packets");
}

/*
Expand Down Expand Up @@ -816,7 +820,7 @@ static bool torture_krb5_as_req_canon(struct torture_context *tctx, const void *
torture_assert(tctx,
test_accept_ticket(tctx,
samba_cmdline_get_creds(),
spn,
expected_principal_string,
client_to_server),
"test_accept_ticket failed - failed to accept the ticket we just created");
} else if (test_data->canonicalize == true
Expand All @@ -828,7 +832,7 @@ static bool torture_krb5_as_req_canon(struct torture_context *tctx, const void *
torture_assert(tctx,
test_accept_ticket(tctx,
samba_cmdline_get_creds(),
principal_string,
expected_principal_string,
client_to_server),
"test_accept_ticket failed - failed to accept the ticket we just created");
} else if (test_data->canonicalize == false
Expand Down

0 comments on commit 1954e50

Please sign in to comment.