Stop including <gssapi.h> from <dst/gssapi.h> header
The only reason for including the gssapi.h from the dst/gssapi.h header was to get the typedefs of gss_cred_id_t and gss_ctx_id_t. Instead of using those types directly this commit introduces dns_gss_cred_id_t and dns_gss_ctx_id_t types that are being used in the public API and privately retyped to their counterparts when we actually call the gss api. This also conceals the gssapi headers, so users of the libdns library doesn't have to add GSSAPI_CFLAGS to the Makefile when including libdns dst API.
This commit is contained in:
@@ -77,8 +77,14 @@
|
||||
#ifdef GSSAPI
|
||||
#include <dst/gssapi.h>
|
||||
#ifdef WIN32
|
||||
#include <gssapi/gssapi.h>
|
||||
#include <gssapi/gssapi_krb5.h>
|
||||
#include <krb5/krb5.h>
|
||||
#else /* ifdef WIN32 */
|
||||
#include ISC_PLATFORM_GSSAPIHEADER
|
||||
#ifdef ISC_PLATFORM_GSSAPI_KRB5_HEADER
|
||||
#include ISC_PLATFORM_GSSAPI_KRB5_HEADER
|
||||
#endif /* ifdef ISC_PLATFORM_GSSAPI_KRB5_HEADER */
|
||||
#include ISC_PLATFORM_KRB5HEADER
|
||||
#endif /* ifdef WIN32 */
|
||||
#endif /* ifdef GSSAPI */
|
||||
@@ -214,7 +220,7 @@ static dns_name_t *keyname;
|
||||
typedef struct nsu_gssinfo {
|
||||
dns_message_t *msg;
|
||||
isc_sockaddr_t *addr;
|
||||
gss_ctx_id_t context;
|
||||
dns_gss_ctx_id_t context;
|
||||
} nsu_gssinfo_t;
|
||||
|
||||
static void
|
||||
@@ -223,7 +229,7 @@ static void
|
||||
start_gssrequest(dns_name_t *master);
|
||||
static void
|
||||
send_gssrequest(isc_sockaddr_t *destaddr, dns_message_t *msg,
|
||||
dns_request_t **request, gss_ctx_id_t context);
|
||||
dns_request_t **request, dns_gss_ctx_id_t context);
|
||||
static void
|
||||
recvgss(isc_task_t *task, isc_event_t *event);
|
||||
#endif /* GSSAPI */
|
||||
@@ -2916,7 +2922,7 @@ failed_gssrequest() {
|
||||
|
||||
static void
|
||||
start_gssrequest(dns_name_t *master) {
|
||||
gss_ctx_id_t context;
|
||||
dns_gss_ctx_id_t context;
|
||||
isc_buffer_t buf;
|
||||
isc_result_t result;
|
||||
uint32_t val = 0;
|
||||
@@ -3019,7 +3025,7 @@ failure:
|
||||
|
||||
static void
|
||||
send_gssrequest(isc_sockaddr_t *destaddr, dns_message_t *msg,
|
||||
dns_request_t **request, gss_ctx_id_t context) {
|
||||
dns_request_t **request, dns_gss_ctx_id_t context) {
|
||||
isc_result_t result;
|
||||
nsu_gssinfo_t *reqinfo;
|
||||
unsigned int options = 0;
|
||||
@@ -3061,7 +3067,7 @@ recvgss(isc_task_t *task, isc_event_t *event) {
|
||||
nsu_gssinfo_t *reqinfo;
|
||||
dns_message_t *tsigquery = NULL;
|
||||
isc_sockaddr_t *addr;
|
||||
gss_ctx_id_t context;
|
||||
dns_gss_ctx_id_t context;
|
||||
isc_buffer_t buf;
|
||||
dns_name_t *servname;
|
||||
dns_fixedname_t fname;
|
||||
|
||||
@@ -64,8 +64,8 @@ static isc_sockaddr_t address;
|
||||
|
||||
static dns_tsig_keyring_t *ring;
|
||||
static dns_tsigkey_t *tsigkey = NULL;
|
||||
static gss_ctx_id_t gssctx;
|
||||
static gss_ctx_id_t *gssctxp = &gssctx;
|
||||
static dns_gss_ctx_id_t gssctx;
|
||||
static dns_gss_ctx_id_t *gssctxp = &gssctx;
|
||||
|
||||
#define RUNCHECK(x) RUNTIME_CHECK((x) == ISC_R_SUCCESS)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user