kdc: only pass HDB_F_CANON if the client specified b->kdc_options.canonicalize
metze Signed-off-by: Love Hörnquist Åstrand <lha@h5l.org>
This commit is contained in:

committed by
Love Hörnquist Åstrand

parent
c9d24dffde
commit
7995bbcb24
@@ -1508,6 +1508,7 @@ tgs_build_reply(krb5_context context,
|
||||
|
||||
Key *tkey_check;
|
||||
Key *tkey_sign;
|
||||
int flags = 0;
|
||||
|
||||
memset(&sessionkey, 0, sizeof(sessionkey));
|
||||
memset(&adtkt, 0, sizeof(adtkt));
|
||||
@@ -1517,6 +1518,9 @@ tgs_build_reply(krb5_context context,
|
||||
s = b->sname;
|
||||
r = b->realm;
|
||||
|
||||
if (b->kdc_options.canonicalize)
|
||||
flags |= HDB_F_CANON;
|
||||
|
||||
if(b->kdc_options.enc_tkt_in_skey){
|
||||
Ticket *t;
|
||||
hdb_entry_ex *uu;
|
||||
@@ -1591,7 +1595,7 @@ tgs_build_reply(krb5_context context,
|
||||
*/
|
||||
|
||||
server_lookup:
|
||||
ret = _kdc_db_fetch(context, config, sp, HDB_F_GET_SERVER | HDB_F_CANON,
|
||||
ret = _kdc_db_fetch(context, config, sp, HDB_F_GET_SERVER | flags,
|
||||
NULL, NULL, &server);
|
||||
|
||||
if(ret == HDB_ERR_NOT_FOUND_HERE) {
|
||||
@@ -1777,7 +1781,7 @@ server_lookup:
|
||||
goto out;
|
||||
}
|
||||
|
||||
ret = _kdc_db_fetch(context, config, cp, HDB_F_GET_CLIENT | HDB_F_CANON,
|
||||
ret = _kdc_db_fetch(context, config, cp, HDB_F_GET_CLIENT | flags,
|
||||
NULL, &clientdb, &client);
|
||||
if(ret == HDB_ERR_NOT_FOUND_HERE) {
|
||||
/* This is OK, we are just trying to find out if they have
|
||||
@@ -1912,7 +1916,7 @@ server_lookup:
|
||||
if(rspac.data) {
|
||||
krb5_pac p = NULL;
|
||||
krb5_data_free(&rspac);
|
||||
ret = _kdc_db_fetch(context, config, tp, HDB_F_GET_CLIENT | HDB_F_CANON,
|
||||
ret = _kdc_db_fetch(context, config, tp, HDB_F_GET_CLIENT | flags,
|
||||
NULL, &s4u2self_impersonated_clientdb, &s4u2self_impersonated_client);
|
||||
if (ret) {
|
||||
const char *msg;
|
||||
|
Reference in New Issue
Block a user