INN commit: trunk (authprogs/auth_krb5.c m4/krb5.m4 m4/pam-const.m4)

INN Commit rra at isc.org
Tue Mar 17 20:10:26 UTC 2015


    Date: Tuesday, March 17, 2015 @ 13:10:25
  Author: iulius
Revision: 9792

Update to latest rra-c-util

Amongst the changes, the one used by INN is:
- Port the Kerberos Autoconf macros and portability framework to the
included Kerberos in Solaris 10 by adding some more entries to the
header search paths.

Modified:
  trunk/authprogs/auth_krb5.c
  trunk/m4/krb5.m4
  trunk/m4/pam-const.m4

-----------------------+
 authprogs/auth_krb5.c |   10 +++++++++-
 m4/krb5.m4            |   40 +++++++++++++++++++++++++---------------
 m4/pam-const.m4       |   23 ++++++++++++++++++-----
 3 files changed, 52 insertions(+), 21 deletions(-)

Modified: authprogs/auth_krb5.c
===================================================================
--- authprogs/auth_krb5.c	2015-01-25 21:14:48 UTC (rev 9791)
+++ authprogs/auth_krb5.c	2015-03-17 20:10:25 UTC (rev 9792)
@@ -23,11 +23,19 @@
 #include "libauth.h"
 #ifdef HAVE_ET_COM_ERR_H
 # include <et/com_err.h>
+#elif defined(HAVE_KERBEROSV5_COM_ERR_H)
+# include <kerberosv5/com_err.h>
 #else
 # include <com_err.h>
 #endif
 
-#include <krb5.h>
+#ifdef HAVE_KRB5_H
+# include <krb5.h>
+#elif HAVE_KERBEROSV5_KRB5_H
+# include <kerberosv5/krb5.h>
+#else
+# include <krb5/krb5.h>
+#endif
 
 #include "inn/messages.h"
 #include "inn/libinn.h"

Modified: m4/krb5.m4
===================================================================
--- m4/krb5.m4	2015-01-25 21:14:48 UTC (rev 9791)
+++ m4/krb5.m4	2015-03-17 20:10:25 UTC (rev 9792)
@@ -65,6 +65,8 @@
 AC_DEFUN([INN_INCLUDES_KRB5], [[
 #if HAVE_KRB5_H
 # include <krb5.h>
+#elif HAVE_KERBEROSV5_KRB5_H
+# include <kerberosv5/krb5.h>
 #else
 # include <krb5/krb5.h>
 #endif
@@ -114,6 +116,23 @@
      AC_MSG_RESULT([yes])],
     [AC_MSG_RESULT([no])])])
 
+dnl Check for the com_err header.  Internal helper macro since we need
+dnl to do the same checks in multiple places.
+AC_DEFUN([_INN_LIB_KRB5_CHECK_HEADER_COM_ERR],
+[AS_IF([test x"$inn_krb5_incroot" = x],
+    [AC_CHECK_HEADERS([et/com_err.h kerberosv5/com_err.h])],
+        [_INN_LIB_KRB5_CHECK_HEADER([et/com_err.h])
+         _INN_LIB_KRB5_CHECK_HEADER([kerberosv5/com_err.h])])])
+
+dnl Check for the main Kerberos header.  Internal helper macro since we need
+dnl to do the same checks in multiple places.
+AC_DEFUN([_INN_LIB_KRB5_CHECK_HEADER_KRB5],
+[AS_IF([test x"$inn_krb5_incroot" = x],
+     [AC_CHECK_HEADERS([krb5.h kerberosv5/krb5.h krb5/krb5.h])],
+     [_INN_LIB_KRB5_CHECK_HEADER([krb5.h])
+      _INN_LIB_KRB5_CHECK_HEADER([kerberosv5/krb5.h])
+      _INN_LIB_KRB5_CHECK_HEADER([krb5/krb5.h])])])
+
 dnl Does the appropriate library checks for reduced-dependency Kerberos
 dnl linkage.  The single argument, if true, says to fail if Kerberos could not
 dnl be found.
@@ -123,10 +142,7 @@
      [AS_IF([test x"$1" = xtrue],
          [AC_MSG_ERROR([cannot find usable Kerberos library])])])
  LIBS="$KRB5_LIBS $LIBS"
- AS_IF([test x"$inn_krb5_incroot" = x],
-     [AC_CHECK_HEADERS([krb5.h krb5/krb5.h])],
-     [_INN_LIB_KRB5_CHECK_HEADER([krb5.h])
-      _INN_LIB_KRB5_CHECK_HEADER([krb5/krb5.h])])
+ _INN_LIB_KRB5_CHECK_HEADER_KRB5
  AC_CHECK_FUNCS([krb5_get_error_message],
      [AC_CHECK_FUNCS([krb5_free_error_message])],
      [AC_CHECK_FUNCS([krb5_get_error_string], [],
@@ -141,7 +157,7 @@
                      [AS_IF([test x"$1" = xtrue],
                          [AC_MSG_ERROR([cannot find usable com_err library])],
                          [KRB5_LIBS=""])])
-                  AC_CHECK_HEADERS([et/com_err.h])])])])])
+                  _INN_LIB_KRB5_CHECK_HEADER_COM_ERR])])])])
  INN_LIB_KRB5_RESTORE])
 
 dnl Does the appropriate library checks for Kerberos linkage when we don't
@@ -188,10 +204,7 @@
         [$inn_krb5_extra])],
     [-lasn1 -lcom_err -lcrypto $inn_krb5_extra])
  LIBS="$KRB5_LIBS $LIBS"
- AS_IF([test x"$inn_krb5_incroot" = x],
-     [AC_CHECK_HEADERS([krb5.h krb5/krb5.h])],
-     [_INN_LIB_KRB5_CHECK_HEADER([krb5.h])
-      _INN_LIB_KRB5_CHECK_HEADER([krb5/krb5.h])])
+ _INN_LIB_KRB5_CHECK_HEADER_KRB5
  AC_CHECK_FUNCS([krb5_get_error_message],
      [AC_CHECK_FUNCS([krb5_free_error_message])],
      [AC_CHECK_FUNCS([krb5_get_error_string], [],
@@ -199,7 +212,7 @@
              [AC_CHECK_FUNCS([krb5_svc_get_msg],
                  [AC_CHECK_HEADERS([ibm_svc/krb5_svc.h], [], [],
                      [INN_INCLUDES_KRB5])],
-                 [AC_CHECK_HEADERS([et/com_err.h])])])])])
+                 [_INN_LIB_KRB5_CHECK_HEADER_COM_ERR])])])])
  INN_LIB_KRB5_RESTORE])
 
 dnl Sanity-check the results of krb5-config and be sure we can really link a
@@ -223,10 +236,7 @@
 [INN_KRB5_CONFIG([${inn_krb5_root}], [krb5], [KRB5],
     [_INN_LIB_KRB5_CHECK([$1])
      INN_LIB_KRB5_SWITCH
-     AS_IF([test x"$inn_krb5_incroot" = x],
-         [AC_CHECK_HEADERS([krb5.h krb5/krb5.h])],
-         [_INN_LIB_KRB5_CHECK_HEADER([krb5.h])
-          _INN_LIB_KRB5_CHECK_HEADER([krb5/krb5.h])])
+     _INN_LIB_KRB5_CHECK_HEADER_KRB5
      AC_CHECK_FUNCS([krb5_get_error_message],
          [AC_CHECK_FUNCS([krb5_free_error_message])],
          [AC_CHECK_FUNCS([krb5_get_error_string], [],
@@ -234,7 +244,7 @@
                  [AC_CHECK_FUNCS([krb5_svc_get_msg],
                      [AC_CHECK_HEADERS([ibm_svc/krb5_svc.h], [], [],
                          [INN_INCLUDES_KRB5])],
-                     [AC_CHECK_HEADERS([et/com_err.h])])])])])
+                     [_INN_LIB_KRB5_CHECK_HEADER_COM_ERR])])])])
      INN_LIB_KRB5_RESTORE],
     [_INN_LIB_KRB5_PATHS
      _INN_LIB_KRB5_MANUAL([$1])])])

Modified: m4/pam-const.m4
===================================================================
--- m4/pam-const.m4	2015-01-25 21:14:48 UTC (rev 9791)
+++ m4/pam-const.m4	2015-03-17 20:10:25 UTC (rev 9792)
@@ -3,8 +3,10 @@
 dnl
 dnl Linux marks several PAM arguments const, including the argument to
 dnl pam_get_item and some arguments to conversation functions, which Solaris
-dnl doesn't.  This test tries to determine which style is in use to select
-dnl whether to declare variables const in order to avoid compiler warnings.
+dnl doesn't.  Mac OS X marks the first argument to pam_strerror const, and
+dnl other platforms don't.  This test tries to determine which style is in use
+dnl to select whether to declare variables const and how to prototype
+dnl functions in order to avoid compiler warnings.
 dnl
 dnl Since this is just for compiler warnings, it's not horribly important if
 dnl we guess wrong.  This test is ugly, but it seems to work.
@@ -14,7 +16,7 @@
 dnl The canonical version of this file is maintained in the rra-c-util
 dnl package, available at <http://www.eyrie.org/~eagle/software/rra-c-util/>.
 dnl
-dnl Copyright 2007 Russ Allbery <eagle at eyrie.org>
+dnl Copyright 2007, 2015 Russ Allbery <eagle at eyrie.org>
 dnl Copyright 2007, 2008 Markus Moeller
 dnl
 dnl This file is free software; the authors give unlimited permission to copy
@@ -34,7 +36,18 @@
 [AC_CACHE_CHECK([whether PAM prefers const], [inn_cv_header_pam_const],
     [AC_EGREP_CPP([const void \*\* *_?item], _INN_HEADER_PAM_CONST_SOURCE(),
         [inn_cv_header_pam_const=yes], [inn_cv_header_pam_const=no])])
-AS_IF([test x"$inn_cv_header_pam_const" = xyes],
+ AS_IF([test x"$inn_cv_header_pam_const" = xyes],
     [inn_header_pam_const=const], [inn_header_pam_const=])
-AC_DEFINE_UNQUOTED([PAM_CONST], [$inn_header_pam_const],
+ AC_DEFINE_UNQUOTED([PAM_CONST], [$inn_header_pam_const],
     [Define to const if PAM uses const in pam_get_item, empty otherwise.])])
+
+AC_DEFUN([INN_HEADER_PAM_STRERROR_CONST],
+[AC_CACHE_CHECK([whether pam_strerror uses const],
+    [inn_cv_header_pam_strerror_const],
+    [AC_EGREP_CPP([pam_strerror *\(const], _INN_HEADER_PAM_CONST_SOURCE(),
+        [inn_cv_header_pam_strerror_const=yes],
+        [inn_cv_header_pam_strerror_const=no])])
+ AS_IF([test x"$inn_cv_header_pam_strerror_const" = xyes],
+    [inn_header_pam_strerror_const=const], [inn_header_pam_strerror_const=])
+ AC_DEFINE_UNQUOTED([PAM_STRERROR_CONST], [$inn_header_pam_strerror_const],
+    [Define to const if PAM uses const in pam_strerror, empty otherwise.])])



More information about the inn-committers mailing list