]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fixes for various OS/environs for RT #23836 (--with-gssapi as default).
authorScott Mann <smann@isc.org>
Wed, 30 Mar 2011 15:48:41 +0000 (15:48 +0000)
committerScott Mann <smann@isc.org>
Wed, 30 Mar 2011 15:48:41 +0000 (15:48 +0000)
bin/tests/system/Makefile.in
bin/tests/system/tsiggss/Makefile.in [new file with mode: 0644]
bin/tests/system/tsiggss/gssapi_krb.c [new file with mode: 0644]
bin/tests/system/tsiggss/prereq.sh
configure.in

index b7f5a824c6f2ddc1d3d72a1b2f1258251bef2fb4..fc038eae06e62e45c0432aa25e081877e836f89f 100644 (file)
@@ -13,7 +13,7 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: Makefile.in,v 1.36 2011/03/10 04:36:15 each Exp $
+# $Id: Makefile.in,v 1.37 2011/03/30 15:48:41 smann Exp $
 
 srcdir =       @srcdir@
 VPATH =                @srcdir@
@@ -21,7 +21,7 @@ top_srcdir =  @top_srcdir@
 
 @BIND9_MAKE_INCLUDES@
 
-SUBDIRS =      dlzexternal filter-aaaa lwresd rpz tkey
+SUBDIRS =      dlzexternal filter-aaaa lwresd rpz tkey tsiggss
 TARGETS =
 
 @BIND9_MAKE_RULES@
diff --git a/bin/tests/system/tsiggss/Makefile.in b/bin/tests/system/tsiggss/Makefile.in
new file mode 100644 (file)
index 0000000..81aea2c
--- /dev/null
@@ -0,0 +1,55 @@
+# Copyright (C) 2011  Internet Systems Consortium, Inc. ("ISC")
+#
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+# PERFORMANCE OF THIS SOFTWARE.
+
+# $Id: Makefile.in,v 1.2 2011/03/30 15:48:41 smann Exp $
+
+srcdir =       @srcdir@
+VPATH =                @srcdir@
+top_srcdir =   @top_srcdir@
+
+@BIND9_VERSION@
+
+@BIND9_MAKE_INCLUDES@
+
+CINCLUDES =    ${DNS_INCLUDES} ${ISC_INCLUDES}
+CDEFINES =
+CWARNINGS =
+
+LIBS =         @LIBS@
+
+#SO_TARGETS =    driver.@SO@
+TARGETS =      gssapi_krb@EXEEXT@ @SO_TARGETS@
+
+SRCS =         gssapi_krb.c driver.c
+
+GSSAPIKRBOBJS      = gssapi_krb.@O@
+
+SO_OBJS         = driver.@O@
+SO_SRCS         = driver.c
+
+OBJS =          ${GSSAPIKRBOBJS}
+
+@BIND9_MAKE_RULES@
+
+CFLAGS =       @CFLAGS@ @SO_CFLAGS@
+
+gssapi_krb@EXEEXT@: ${GSSAPIKRBOBJS}
+       ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} \
+               -o $@ ${GSSAPIKRBOBJS} ${LIBS}
+
+#driver.@SO@: ${SO_OBJS}
+#      @SO_LD@ -o $@ driver.o
+
+clean distclean::
+       rm -f ${TARGETS}
diff --git a/bin/tests/system/tsiggss/gssapi_krb.c b/bin/tests/system/tsiggss/gssapi_krb.c
new file mode 100644 (file)
index 0000000..b2046d0
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2011  Internet Systems Consortium, Inc. ("ISC")
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: gssapi_krb.c,v 1.2 2011/03/30 15:48:41 smann Exp $ */
+
+#include <config.h>
+
+int
+main() {
+#if defined(HAVE_GSSAPI_H) && defined(HAVE_KRB5_H)
+       return (0);
+#else
+       return (1);
+#endif
+}
index 17c7d5a396e9ce2a5fcf24ab20a3eb594d45e4ff..8a3b7fb1565436855daba158dd2dbb2a033304c8 100644 (file)
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: prereq.sh,v 1.3 2010/12/20 23:47:20 tbox Exp $
+# $Id: prereq.sh,v 1.4 2011/03/30 15:48:41 smann Exp $
 
 TOP=${SYSTEMTESTTOP:=.}/../../../..
 
 # enable the tsiggss test only if gssapi was enabled
-$TOP/bin/named/named -V | grep with.gssapi | grep -v with-gssapi=no > /dev/null || {
-    echo "I:BIND9 was not built with --with-gssapi"
-    exit 255
+./gssapi_krb5 ||  {
+        echo "I:gssapi and krb5 not supported - skipping tsiggss test"
+        exit 255
 }
 
 exit 0
index 9328f8a5b6e6ea9e56c8b89308709771add94875..0e304d05ca8cef42e03e2fdafd6bdc205db2a8e4 100644 (file)
@@ -18,7 +18,7 @@ AC_DIVERT_PUSH(1)dnl
 esyscmd([sed "s/^/# /" COPYRIGHT])dnl
 AC_DIVERT_POP()dnl
 
-AC_REVISION($Revision: 1.521 $)
+AC_REVISION($Revision: 1.522 $)
 
 AC_INIT(lib/dns/name.c)
 AC_PREREQ(2.59)
@@ -803,23 +803,34 @@ AC_ARG_WITH(gssapi,
 # gssapi is just the framework, we really require kerberos v5, so
 # look for those headers (the gssapi headers must be there, too)
 # The problem with this implementation is that it doesn't allow
-# for the specification of gssapi and krb5 headers in different locations
-# This probably ought to be fixed.
-krb5dirs="/usr/local /usr/local/krb5 /usr/local/kerberosv5 /usr/local/kerberos /usr/pkg /usr/krb5 /usr/kerberosv5 /usr/kerberos /usr"
+# for the specification of gssapi and krb5 headers in different locations,
+# which probably ought to be fixed although fixing might raise the issue of
+# trying to build with incompatible versions of gssapi and krb5.
 if test "$use_gssapi" = "yes"
 then
-       for d in $krb5dirs
-       do
-               if test -f $d/include/gssapi/gssapi_krb5.h -o -f $d/include/krb5.h
+       # first, deal with the obvious
+       if test \( -f /usr/include/kerberosv5/krb5.h -o \
+                  -f /usr/include/krb5/krb5.h -o \
+                  -f /usr/include/krb5.h \)   -a -f /usr/include/gssapi.h
+       then
+               use_gssapi=/usr
+       else
+           krb5dirs="/usr/local /usr/local/krb5 /usr/local/kerberosv5 /usr/local/kerberos /usr/pkg /usr/krb5 /usr/kerberosv5 /usr/kerberos /usr"
+           for d in $krb5dirs
+           do
+               if test -f $d/include/gssapi/gssapi_krb5.h -o \
+                       -f $d/include/krb5.h
                then
-                       if test -f $d/include/gssapi/gssapi.h -o -f $d/include/gssapi.h
+                       if test -f $d/include/gssapi/gssapi.h -o \
+                               -f $d/include/gssapi.h
                        then
                                use_gssapi=$d
                                break
                        fi
                fi
                use_gssapi="no"
-       done
+           done
+       fi
 fi
 
 case "$use_gssapi" in
@@ -3416,6 +3427,7 @@ AC_CONFIG_FILES([
        bin/tests/system/lwresd/Makefile
        bin/tests/system/rpz/Makefile
        bin/tests/system/tkey/Makefile
+       bin/tests/system/tsiggss/Makefile
        bin/tests/tasks/Makefile
        bin/tests/timers/Makefile
        bin/tests/virtual-time/Makefile