From 8c09b149d2982ae8e9e0fb7dfc6e171271da8c7b Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Tue, 9 Jul 2013 17:42:29 -0500 Subject: [PATCH] Comment cleanup No, we shouldn't assert, and those error codes should be okay (haven't heard any better ideas). Get rid of these comments, so there's no confusion. Merge into "Clean up akimpersonate and use for server-to-server". --- src/auth/akimpersonate.c | 3 ++- src/auth/akimpersonate_v5gen.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/auth/akimpersonate.c b/src/auth/akimpersonate.c index 44c6e6f44..644db0164 100644 --- a/src/auth/akimpersonate.c +++ b/src/auth/akimpersonate.c @@ -239,7 +239,8 @@ encode_krb5_enc_tkt_part(krb5_enc_tkt_part *encpart, krb5_data **a_out) return code; invalid: - /* XXX or assert, or ...? */ + /* We don't handle all possible ticket options, features, etc. If we are + * given a ticket we can't handle, bail out with EINVAL. */ code = EINVAL; goto cleanup; } diff --git a/src/auth/akimpersonate_v5gen.c b/src/auth/akimpersonate_v5gen.c index 623b55117..4ace8df69 100644 --- a/src/auth/akimpersonate_v5gen.c +++ b/src/auth/akimpersonate_v5gen.c @@ -89,7 +89,7 @@ akv5gen_encode_krb5_ticket(int kvno, ASN1_MALLOC_ENCODE(Ticket, outdata, outlen, &v5gen_tkt, &dummy, code); if (code == 0 && dummy != outlen) - code = EINVAL; /* XXX what error should this be? */ + code = EINVAL; if (code) goto cleanup; @@ -160,7 +160,7 @@ akv5gen_encode_krb5_enc_tkt_part(int enctype, ASN1_MALLOC_ENCODE(EncTicketPart, outdata, outlen, &v5gen_enc, &dummy, code); if (code == 0 && dummy != outlen) - code = EINVAL; /* XXX what error should this be? */ + code = EINVAL; if (code) goto cleanup; -- 2.39.5