summaryrefslogtreecommitdiff
path: root/source4/torture/krb5
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2015-02-03 15:51:41 +1300
committerAndrew Bartlett <abartlet@samba.org>2015-02-08 08:07:08 +0100
commit60c791339122b8b3f9be5bc085badd14e2ca6058 (patch)
tree66b919a8531a301bed31c537696a17893825fc7f /source4/torture/krb5
parente05ad3500fb501f87c1eb77a1c13c5c237f02b3d (diff)
downloadsamba-60c791339122b8b3f9be5bc085badd14e2ca6058.tar.gz
torture-krb5: Add additional assertions for non-canon TGS-REP
This confirms that the KDC does not modify the returned principal in a TGS-REP unconditionally. Pair-programmed-with: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/torture/krb5')
-rw-r--r--source4/torture/krb5/kdc-canon.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source4/torture/krb5/kdc-canon.c b/source4/torture/krb5/kdc-canon.c
index 8dbfd9374a5..d18905e64e2 100644
--- a/source4/torture/krb5/kdc-canon.c
+++ b/source4/torture/krb5/kdc-canon.c
@@ -647,6 +647,15 @@ static bool torture_krb5_post_recv_self_trust_tgs_req_test(struct torture_krb5_c
test_context->tgs_req.req_body.sname->name_type,
"Mismatch in name_type between request and ticket response");
+ torture_assert_int_equal(test_context->tctx,
+ test_context->tgs_rep.ticket.sname.name_string.len, 2,
+ "Mismatch in name between request and expected request, expected krbtgt/realm");
+ torture_assert_str_equal(test_context->tctx,
+ test_context->tgs_rep.ticket.sname.name_string.val[0], "krbtgt",
+ "Mismatch in name between request and expected request, expected krbtgt");
+ torture_assert_str_equal(test_context->tctx,
+ test_context->tgs_rep.ticket.sname.name_string.val[1], test_context->test_data->realm,
+ "Mismatch in realm part of cross-realm request principal between response and expected request");
/*
* We can confirm that the correct proxy behaviour is
* in use on the KDC by checking the KVNO of the