From e3a5169862d777d5fbbbff5834c2bb79683db30f Mon Sep 17 00:00:00 2001 From: Luke Howard Date: Thu, 23 Dec 2021 19:31:15 +1100 Subject: [PATCH] kdc: make common astgs_request_t elements public API --- kdc/kdc.h | 35 +++++++++++++++++++++++++++++++++++ kdc/kdc_locl.h | 22 ---------------------- 2 files changed, 35 insertions(+), 22 deletions(-) diff --git a/kdc/kdc.h b/kdc/kdc.h index 32f974751..d7ea673a0 100644 --- a/kdc/kdc.h +++ b/kdc/kdc.h @@ -46,6 +46,10 @@ #include #include +#define heim_pcontext krb5_context +#define heim_pconfig krb5_kdc_configuration * +#include + enum krb5_kdc_trpolicy { TRPOLICY_ALWAYS_CHECK, TRPOLICY_ALLOW_PER_PRINCIPAL, @@ -124,6 +128,34 @@ typedef struct krb5_kdc_configuration { const char *app; } krb5_kdc_configuration; +#define ASTGS_REQUEST_DESC_COMMON_ELEMENTS \ + HEIM_SVC_REQUEST_DESC_COMMON_ELEMENTS; \ + \ + KDC_REQ req; \ + \ + KDC_REP rep; \ + EncTicketPart et; \ + EncKDCRepPart ek; \ + \ + /* princ requested by client (AS) or canon princ (TGT) */ \ + krb5_principal client_princ; \ + hdb_entry_ex *client; \ + HDB *clientdb; \ + \ + krb5_principal server_princ; \ + hdb_entry_ex *server; \ + \ + krb5_keyblock reply_key; \ + \ + krb5_pac pac; \ + uint64_t pac_attributes; + +#ifndef __KDC_LOCL_H__ +struct astgs_request_desc { + ASTGS_REQUEST_DESC_COMMON_ELEMENTS +}; +#endif + typedef struct kdc_request_desc *kdc_request_t; typedef struct astgs_request_desc *astgs_request_t; typedef struct kx509_req_context_desc *kx509_req_context; @@ -138,4 +170,7 @@ struct krb5_kdc_service { #include +#undef heim_pcontext +#undef heim_pconfig + #endif diff --git a/kdc/kdc_locl.h b/kdc/kdc_locl.h index 9dbf925c9..a075ea447 100644 --- a/kdc/kdc_locl.h +++ b/kdc/kdc_locl.h @@ -67,28 +67,6 @@ struct kdc_request_desc { struct as_request_pa_state; struct kdc_patypes; -#define ASTGS_REQUEST_DESC_COMMON_ELEMENTS \ - HEIM_SVC_REQUEST_DESC_COMMON_ELEMENTS; \ - \ - KDC_REQ req; \ - \ - KDC_REP rep; \ - EncTicketPart et; \ - EncKDCRepPart ek; \ - \ - /* princ requested by client (AS) or canon princ (TGT) */ \ - krb5_principal client_princ; \ - hdb_entry_ex *client; \ - HDB *clientdb; \ - \ - krb5_principal server_princ; \ - hdb_entry_ex *server; \ - \ - krb5_keyblock reply_key; \ - \ - krb5_pac pac; \ - uint64_t pac_attributes; - struct astgs_request_desc { ASTGS_REQUEST_DESC_COMMON_ELEMENTS;