diff options
author | Joe Orton <jorton@redhat.com> | 2023-01-19 11:35:35 +0000 |
---|---|---|
committer | Joe Orton <jorton@apache.org> | 2023-01-19 14:48:08 +0000 |
commit | 4fdcff4a0ccbb0924f7dabcf8d213452aa33ab82 (patch) | |
tree | d352bf2f50c4ee8e085577feed27f217e5fbe412 | |
parent | 263007c57857da3a7e5c602f4798698772127e6e (diff) | |
download | neon-git-4fdcff4a0ccbb0924f7dabcf8d213452aa33ab82.tar.gz |
Fail configure if --with-gssapi is used but GSSAPI library detection
fails [fixes #102, issue #52]
* macros/neon.m4 (NEON_GSSAPI): Fail if --with-gssapi is passed
but library detection fails. Use NE_*_SUPPORT.
* configure.in: Report GSSAPI library detection result.
-rw-r--r-- | NEWS | 5 | ||||
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | macros/neon.m4 | 13 |
3 files changed, 17 insertions, 2 deletions
@@ -1,3 +1,8 @@ +Changes in release 0.32.5: +* NOTE: Since 0.32.0 the KRB5_CONFIG environment variable is ignored + when running configure. Use KRB5_CONF_TOOL instead. +* Fail for configure --with-gssapi if GSSAPI can't be enabled (issue #102) + Changes in release 0.32.4: * Fix Digest regression in allowing implicit algorithm= (issue #88) * Fix Digest to safely allow spaces in usernames (without userhash) diff --git a/configure.ac b/configure.ac index 8c782aa..d2d4e06 100644 --- a/configure.ac +++ b/configure.ac @@ -199,6 +199,7 @@ AC_MSG_NOTICE([Configured to build AC_PACKAGE_STRING: XML Parser: ${neon_xml_parser_message} SSL library: ${ne_SSL_message} zlib support: ${ne_ZLIB_message} + GSSAPI support: ${ne_GSSAPI_message} Build libraries: Shared=${enable_shared}, Static=${enable_static} ]) diff --git a/macros/neon.m4 b/macros/neon.m4 index 72bcf0b..1b1c28c 100644 --- a/macros/neon.m4 +++ b/macros/neon.m4 @@ -1128,7 +1128,8 @@ esac dnl Check for Kerberos installation AC_DEFUN([NEON_GSSAPI], [ -AC_ARG_WITH(gssapi, AS_HELP_STRING(--without-gssapi, disable GSSAPI support)) +AC_ARG_WITH(gssapi, AS_HELP_STRING(--without-gssapi, disable GSSAPI support), + [need_gssapi=$withval], [need_gssapi=no]) if test "$with_gssapi" != "no"; then ne_save_CFLAGS=$CFLAGS ne_save_LIBS=$NEON_LIBS @@ -1152,7 +1153,7 @@ if test "x$KRB5_CONF_TOOL" != "xnone"; then NE_CHECK_FUNCS(gss_init_sec_context, [ ne_save_CFLAGS=$CFLAGS ne_save_LIBS=$NEON_LIBS - AC_MSG_NOTICE([GSSAPI authentication support enabled, using $NE_GSSAPI_VERSION]) + NE_ENABLE_SUPPORT(GSSAPI, [GSSAPI support enabled, using library ${NE_GSSAPI_LIBS} version ${NE_GSSAPI_VERSION}]) AC_DEFINE(HAVE_GSSAPI, 1, [Define if GSSAPI support is enabled]) AC_CHECK_HEADERS(gssapi/gssapi_generic.h) # Older versions of MIT Kerberos lack GSS_C_NT_HOSTBASED_SERVICE @@ -1168,6 +1169,14 @@ if test "x$KRB5_CONF_TOOL" != "xnone"; then ]) CFLAGS=$ne_save_CFLAGS NEON_LIBS=$ne_save_LIBS +fi + +if test x$NE_FLAG_GSSAPI != xyes; then + if test $need_gssapi = yes; then + # Fail if --with-gssapi was specified but no library support found + AC_MSG_ERROR([could not enable GSSAPI support]) + fi + NE_DISABLE_SUPPORT(GSSAPI, [GSSAPI authentication is not supported]) fi]) AC_DEFUN([NEON_LIBPROXY], [ |