Don't define a stub read_keytab_file() on Windows if we don't have Kerberos.

We don't declare it, so all the DLL export stuff won't work, and we
shouldn't need it, as we shouldn't be calling it if we don't have
Kerberos (we shouldn't support the -K option if we don't have Kerberos,
for example).

Change-Id: I7e7b12aa93c4f31953300ef513fc09a1f55f8aef
Reviewed-on: https://code.wireshark.org/review/6255
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2015-01-02 13:17:15 -08:00
parent 970e7c1921
commit 5eecf81b0c
2 changed files with 9 additions and 47 deletions

View File

@ -256,26 +256,14 @@ read_keytab_file_from_preferences(void)
read_keytab_file(last_keytab);
}
#elif defined(_WIN32)
/*
* Dummy version to allow us to export this function -- even
* on systems without KERBEROS.
*/
void
read_keytab_file_from_preferences(void)
{
}
#endif
#endif /* HAVE_KERBEROS */
#if defined(HAVE_HEIMDAL_KERBEROS) || defined(HAVE_MIT_KERBEROS)
#ifdef _WIN32
/* prevent redefinition warnings in kfw-2.5\inc\win_mac.h */
#undef HAVE_STDARG_H
#undef HAVE_SYS_TYPES_H
#endif
#endif /* _WIN32 */
#include <krb5.h>
enc_key_t *enc_key_list=NULL;
@ -300,14 +288,7 @@ add_encryption_key(packet_info *pinfo, int keytype, int keylength, const char *k
}
#endif /* HAVE_HEIMDAL_KERBEROS || HAVE_MIT_KERBEROS */
#if defined(_WIN32) && !defined(HAVE_HEIMDAL_KERBEROS) && !defined(HAVE_MIT_KERBEROS) && !defined(HAVE_LIBNETTLE)
void
read_keytab_file(const char *filename _U_)
{
}
#endif
#ifdef HAVE_MIT_KERBEROS
#if defined(HAVE_MIT_KERBEROS)
static krb5_context krb5_ctx;

View File

@ -507,26 +507,14 @@ read_keytab_file_from_preferences(void)
read_keytab_file(last_keytab);
}
#elif defined(_WIN32)
/*
* Dummy version to allow us to export this function -- even
* on systems without KERBEROS.
*/
void
read_keytab_file_from_preferences(void)
{
}
#endif
#endif /* HAVE_KERBEROS */
#if defined(HAVE_HEIMDAL_KERBEROS) || defined(HAVE_MIT_KERBEROS)
#ifdef _WIN32
/* prevent redefinition warnings in kfw-2.5\inc\win_mac.h */
#undef HAVE_STDARG_H
#undef HAVE_SYS_TYPES_H
#endif
#endif /* _WIN32 */
#include <krb5.h>
enc_key_t *enc_key_list=NULL;
@ -551,14 +539,7 @@ add_encryption_key(packet_info *pinfo, int keytype, int keylength, const char *k
}
#endif /* HAVE_HEIMDAL_KERBEROS || HAVE_MIT_KERBEROS */
#if defined(_WIN32) && !defined(HAVE_HEIMDAL_KERBEROS) && !defined(HAVE_MIT_KERBEROS) && !defined(HAVE_LIBNETTLE)
void
read_keytab_file(const char *filename _U_)
{
}
#endif
#ifdef HAVE_MIT_KERBEROS
#if defined(HAVE_MIT_KERBEROS)
static krb5_context krb5_ctx;
@ -4261,7 +4242,7 @@ dissect_kerberos_ChangePasswdData(gboolean implicit_tag _U_, tvbuff_t *tvb _U_,
/*--- End of included file: packet-kerberos-fn.c ---*/
#line 2001 "../../asn1/kerberos/packet-kerberos-template.c"
#line 1982 "../../asn1/kerberos/packet-kerberos-template.c"
/* Make wrappers around exported functions for now */
int
@ -5299,7 +5280,7 @@ void proto_register_kerberos(void) {
NULL, HFILL }},
/*--- End of included file: packet-kerberos-hfarr.c ---*/
#line 2382 "../../asn1/kerberos/packet-kerberos-template.c"
#line 2363 "../../asn1/kerberos/packet-kerberos-template.c"
};
/* List of subtrees */
@ -5373,7 +5354,7 @@ void proto_register_kerberos(void) {
&ett_kerberos_ChangePasswdData,
/*--- End of included file: packet-kerberos-ettarr.c ---*/
#line 2398 "../../asn1/kerberos/packet-kerberos-template.c"
#line 2379 "../../asn1/kerberos/packet-kerberos-template.c"
};
static ei_register_info ei[] = {