diff options
author | Andrew Bartlett <abartlet@samba.org> | 2015-02-02 13:55:25 +1300 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2015-02-08 08:07:07 +0100 |
commit | 4bafb45b096e7246d8186f379a4663b755fb0d37 (patch) | |
tree | 33aac26c69d05c3220ac06c1d0baf8e0c528c44c /source4 | |
parent | 11871c853a911b85ebb3f9ff5671ce1f9024188f (diff) | |
download | samba-4bafb45b096e7246d8186f379a4663b755fb0d37.tar.gz |
torture-krb5: Improve the assertions in our KDC tests to be more explicit
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Diffstat (limited to 'source4')
-rw-r--r-- | source4/torture/krb5/kdc-canon.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source4/torture/krb5/kdc-canon.c b/source4/torture/krb5/kdc-canon.c index 8c9543c9fa4..ef00e7031b0 100644 --- a/source4/torture/krb5/kdc-canon.c +++ b/source4/torture/krb5/kdc-canon.c @@ -367,6 +367,17 @@ static bool torture_krb5_post_recv_tgs_req_canon_test(struct torture_krb5_contex 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, + test_context->tgs_req.req_body.sname->name_string.len, + "Mismatch in name_string.len between request and ticket response"); + torture_assert(test_context->tctx, + test_context->tgs_rep.ticket.sname.name_string.len >= 1, + "name_string.len should be >=1 in ticket response"); + torture_assert_str_equal(test_context->tctx, + test_context->tgs_rep.ticket.sname.name_string.val[0], + test_context->tgs_req.req_body.sname->name_string.val[0], + "Mismatch in name between request and expected request"); + torture_assert_int_equal(test_context->tctx, *test_context->tgs_rep.ticket.enc_part.kvno & 0xFFFF0000, 0, "Unexpecedly got a RODC number in the KVNO, should just be principal KVNO"); free_TGS_REP(&test_context->tgs_rep); |