From 9556fe631315b4bc719eb9aa16553a06ef376821 Mon Sep 17 00:00:00 2001 From: cantor Date: Mon, 25 Oct 2004 03:33:12 +0000 Subject: [PATCH] Porting changes from 1.2 branch git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/trunk@1217 cb58f699-b61c-0410-a6fe-9272a202ed29 --- bootstrap | 4 +- config_win32.h | 26 +++++-- configs/shibboleth.xml.in | 14 ++-- configure.ac | 92 +++++++++++++++++++------ schemas/shibboleth-targetconfig-1.0.xsd | 2 +- schemas/soap-envelope.xsd | 16 +++-- shib/ShibConfig.cpp | 2 +- shib/resource.h | 15 ++++ shib/shib.dsp | 8 +++ shib/shib.rc | 117 ++++++++++++++++++++++++++++++++ 10 files changed, 254 insertions(+), 42 deletions(-) create mode 100644 shib/resource.h create mode 100644 shib/shib.rc diff --git a/bootstrap b/bootstrap index 6a97012..59d96ed 100755 --- a/bootstrap +++ b/bootstrap @@ -13,11 +13,11 @@ find_program() } # Find appropriate versions of the auto tools -find_program aclocal 1.5 +find_program aclocal 1.7 aclocal="$program" find_program autoheader 2.53 autoheader="$program" -find_program automake 1.5 +find_program automake 1.7 automake="$program" find_program autoconf 2.53 autoconf="$program" diff --git a/config_win32.h b/config_win32.h index 1b41134..4a7d0e5 100644 --- a/config_win32.h +++ b/config_win32.h @@ -1,6 +1,18 @@ /* config.h. Generated by configure. */ /* config.h.in. Generated from configure.ac by autoheader. */ +/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you + don't. */ +#define HAVE_DECL_STRERROR_R 0 + +/* Define to 1 if you have the declaration of `svcfd_create', and to 0 if you + don't. */ +#define HAVE_DECL_SVCFD_CREATE 1 + +/* Define to 1 if you have the declaration of `sys_errlist', and to 0 if you + don't. */ +/* #undef HAVE_DECL_SYS_ERRLIST */ + /* Define to 1 if you have the header file. */ /* #undef HAVE_DLFCN_H */ @@ -38,7 +50,7 @@ #define HAVE_SAML 1 /* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 +/* #undef HAVE_STDINT_H */ /* Define to 1 if you have the header file. */ #define HAVE_STDLIB_H 1 @@ -67,6 +79,9 @@ /* Define to 1 if you have the `strtok_r' function. */ /* #undef HAVE_STRTOK_R */ +/* Define to 1 if the system has the type `struct rpcent'. */ +/* #undef HAVE_STRUCT_RPCENT */ + /* Define to 1 if you have the `strerror_r' function. */ /* #undef HAVE_STRERROR_R */ @@ -79,6 +94,9 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_UNISTD_H */ +/* Define if RPC SVC macros work on this platform */ +#define HAVE_WORKING_SVC_DESTROY 1 + /* Name of package */ #define PACKAGE "shibboleth" @@ -89,13 +107,13 @@ #define PACKAGE_NAME "shibboleth" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "shibboleth 1.2" +#define PACKAGE_STRING "shibboleth 1.2.1" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "shibboleth" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.2" +#define PACKAGE_VERSION "1.2.1" /* Define to the necessary symbol if this constant uses a non-standard name on your system. */ @@ -111,7 +129,7 @@ #define USE_OUR_ONCRPC 1 /* Version number of package */ -#define VERSION "1.2" +#define VERSION "1.2.1" /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ diff --git a/configs/shibboleth.xml.in b/configs/shibboleth.xml.in index b33d621..e463948 100644 --- a/configs/shibboleth.xml.in +++ b/configs/shibboleth.xml.in @@ -58,22 +58,24 @@ Apache's ServerName and Port directives or the IIS Site mapping in the element below. --> - + - - - - - + + diff --git a/configure.ac b/configure.ac index d82894c..4737f43 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ AC_PREREQ([2.50]) -AC_INIT([shibboleth], [1.2], [shibboleth-users@internet2.edu], [shibboleth]) +AC_INIT([shibboleth], [1.2.1], [shibboleth-users@internet2.edu], [shibboleth]) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(shibboleth, 1.2) +AM_INIT_AUTOMAKE([shibboleth],[1.2.1]) sinclude(acx_pthread.m4) sinclude(acx_rpctest.m4) @@ -19,8 +19,8 @@ else GCC_CXXFLAGS="$CXXFLAGS -O2 -DNDEBUG" fi -AC_PROG_CC([gcc3 gcc cc]) -AC_PROG_CXX([g++3 g++ c++ CC]) +AC_PROG_CC([gcc gcc3 cc]) +AC_PROG_CXX([g++ g++3 c++ CC]) if test "$GCC" = "yes" ; then CFLAGS="$GCC_CFLAGS" @@ -32,6 +32,12 @@ AC_PROG_LIBTOOL AC_LANG(C++) +# C++ requirements +AC_CXX_REQUIRE_STL +AC_CXX_NAMESPACES + +AC_LANG(C) + # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_SIZE_T @@ -43,11 +49,6 @@ AC_FUNC_STRERROR_R AC_CHECK_FUNCS([strchr strdup strstr gmtime_r strtok_r strcasecmp]) AC_CHECK_HEADERS([dlfcn.h]) -# C++ requirements -AC_CXX_REQUIRE_STL -AC_CXX_NAMESPACES - - # old_LIBS="$LIBS" # AC_SEARCH_LIBS(xdr_uint64_t,nsl,, # [CFLAGS="$CFLAGS -DNEED_XDR_LONGLONG" @@ -65,8 +66,49 @@ else CXXFLAGS="$PTHREAD_CFLAGS $CXXFLAGS" fi -# Test RPC now -- deal with it later +# Test RPC now -- finish dealing with it later +AC_ARG_ENABLE(native-rpc, + AC_HELP_STRING([--enable-native-rpc], [use the OS-supplied Sun RPC library, default is NO, except Linux]), + [ if test "x$enableval" = "x" ; then + NATIVE_RPC=yes + else + NATIVE_RPC="$enableval" + fi + ], [ NATIVE_RPC=no ]) ACX_RPCTEST([rpctest="yes"],[rpctest="no"]) +AC_MSG_NOTICE([does the native Sun RPC library support svcfd_create...$rpctest]) +if test $NATIVE_RPC = "no"; then + case "${host}" in + *-*-linux*) + if test $rpctest = "yes"; then + AC_MSG_WARN([embedded Sun RPC library does not support Linux]) + NATIVE_RPC="yes" + else + AC_MSG_ERROR([embedded Sun RPC library won't work, but neither will native version]) + fi + ;; + esac +fi +if test $NATIVE_RPC = "yes" && test $rpctest = "no"; then + AC_MSG_WARN([native Sun RPC won't work, using internal version]) + NATIVE_RPC = "no" +fi +if test $NATIVE_RPC = "yes"; then + AC_CHECK_DECLS([svcfd_create],,,[#include ]) + AC_LANG_PUSH(C++) + AC_COMPILE_IFELSE( + AC_LANG_PROGRAM( + [[#include +static SVCXPRT* xprt = NULL;]], + [[svc_destroy(xprt);]]), + AC_DEFINE(HAVE_WORKING_SVC_DESTROY,1,[Define if RPC SVC macros work on this platform]),) + AC_LANG_POP(C++) +else + AC_CHECK_TYPES([struct rpcent],,,[#include ]) + AC_CHECK_DECLS(sys_errlist) + AC_DEFINE(HAVE_DECL_SVCFD_CREATE,1,[ Define to 1 if you have the declaration of svcfd_create, and to 0 if you don't.]) + AC_DEFINE(HAVE_WORKING_SVC_DESTROY,1,[Define if RPC SVC macros work on this platform]) +fi AC_ARG_WITH(dmalloc, AC_HELP_STRING([--with-dmalloc=PATH], [where dmalloc is installed]), @@ -110,6 +152,8 @@ AC_TRY_LINK_FUNC([SSL_library_init],, AC_MSG_ERROR([unable to link with openssl libraries])) AC_MSG_RESULT(yes) +AC_LANG(C++) + # log4cpp settings AC_PATH_PROG(LOG4CPP_CONFIG,log4cpp-config) AC_ARG_WITH(log4cpp, @@ -139,16 +183,22 @@ AC_ARG_WITH(xerces, LIBS="-lxerces-c $LIBS" AC_CHECK_HEADER([xercesc/dom/DOM.hpp],, AC_MSG_ERROR([unable to find xerces header files])) -AC_TRY_LINK( - [#include -#include ], - [#if _XERCES_VERSION >= 20300 -xercesc::XMLPlatformUtils::Initialize(); +AC_MSG_CHECKING([Xerces version]) +AC_PREPROC_IFELSE( + [AC_LANG_PROGRAM([#include ], +[#if _XERCES_VERSION != 20600 && _XERCES_VERSION >= 20300 +int i = 0; #else -#error Need Xerces-C version 2.3 or higher -#endif], - [AC_DEFINE(HAVE_LIBXERCESC,1,[Define if Xerces-C library was found])], - [AC_MSG_ERROR([unable to link with Xerces])]) +#error cannot use version = 2.6.0 or < 2.3.0 +#endif])], + [AC_MSG_RESULT(OK)], + [AC_MSG_FAILURE([Shibboleth requires a Xerces version > 2.3.0, but cannot use 2.6.0 -- a 2.6.1 patched release is available from us])]) +AC_TRY_LINK( + [#include ], + [xercesc::XMLPlatformUtils::Initialize()], + [AC_DEFINE(HAVE_LIBXERCESC,1,[Define if Xerces-C library was found])], + [AC_MSG_ERROR([unable to link with Xerces])]) + # XML-Security settings AC_ARG_WITH(xmlsec, @@ -195,11 +245,11 @@ AC_CONFIG_FILES([Makefile doc/Makefile shib/Makefile schemas/Makefile \ # now deal with the rpc library, to see if we need to build our own -if test $rpctest = "no"; then +if test $NATIVE_RPC = "no"; then WANT_SUBDIRS="oncrpc $WANT_SUBDIRS" AC_DEFINE(USE_OUR_ONCRPC,1,[Define if using embedded version of ONC RPC.]) fi -AM_CONDITIONAL(USE_OUR_ONCRPC,test "$rpctest" = "no") +AM_CONDITIONAL(USE_OUR_ONCRPC,test "$NATIVE_RPC" = "no") # Apache 1.3 (mod_shib_13) diff --git a/schemas/shibboleth-targetconfig-1.0.xsd b/schemas/shibboleth-targetconfig-1.0.xsd index 0021c77..f49292e 100644 --- a/schemas/shibboleth-targetconfig-1.0.xsd +++ b/schemas/shibboleth-targetconfig-1.0.xsd @@ -278,7 +278,7 @@ - + diff --git a/schemas/soap-envelope.xsd b/schemas/soap-envelope.xsd index 778a687..0cbb08e 100644 --- a/schemas/soap-envelope.xsd +++ b/schemas/soap-envelope.xsd @@ -12,6 +12,11 @@ Changes made are the following: - reverted namespace to http://schemas.xmlsoap.org/soap/envelope/ - reverted mustUnderstand to only allow 0 and 1 as lexical values + - made encodingStyle a global attribute 20020825 + + Further changes: + + - removed default value from mustUnderstand attribute declaration - 20030314 Original copyright: @@ -66,7 +71,7 @@ - + @@ -84,10 +89,12 @@ + - + + @@ -111,8 +118,3 @@ - - - - - diff --git a/shib/ShibConfig.cpp b/shib/ShibConfig.cpp index 9632711..4372d77 100644 --- a/shib/ShibConfig.cpp +++ b/shib/ShibConfig.cpp @@ -92,7 +92,7 @@ extern "C" void openssl_locking_callback(int mode,int n,const char *file,int lin #ifndef WIN32 extern "C" unsigned long openssl_thread_id(void) { - return static_cast(pthread_self()); + return (unsigned long)(pthread_self()); } #endif diff --git a/shib/resource.h b/shib/resource.h new file mode 100644 index 0000000..8223709 --- /dev/null +++ b/shib/resource.h @@ -0,0 +1,15 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by shib.rc +// + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 101 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/shib/shib.dsp b/shib/shib.dsp index 17dbe2d..5e799d6 100644 --- a/shib/shib.dsp +++ b/shib/shib.dsp @@ -109,6 +109,10 @@ SOURCE=.\ReloadableXMLFile.cpp # End Source File # Begin Source File +SOURCE=.\resource.h +# End Source File +# Begin Source File + SOURCE=".\shib-threads-win32.cpp" # End Source File # Begin Source File @@ -121,6 +125,10 @@ SOURCE=.\shib.h # End Source File # Begin Source File +SOURCE=.\shib.rc +# End Source File +# Begin Source File + SOURCE=.\ShibBinding.cpp # End Source File # Begin Source File diff --git a/shib/shib.rc b/shib/shib.rc new file mode 100644 index 0000000..fec66c9 --- /dev/null +++ b/shib/shib.rc @@ -0,0 +1,117 @@ +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 5,0,1,0 + PRODUCTVERSION 1,2,1,0 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x40004L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "\0" + VALUE "CompanyName", "UCAID\0" + VALUE "FileDescription", "Shibboleth Core\0" + VALUE "FileVersion", "5, 0, 1, 0\0" +#ifdef _DEBUG + VALUE "InternalName", "shib_5D\0" +#else + VALUE "InternalName", "shib_5\0" +#endif + VALUE "LegalCopyright", "Copyright © 2004 UCAID\0" + VALUE "LegalTrademarks", "\0" +#ifdef _DEBUG + VALUE "OriginalFilename", "shib_5D.dll\0" +#else + VALUE "OriginalFilename", "shib_5.dll\0" +#endif + VALUE "PrivateBuild", "\0" + VALUE "ProductName", "Shibboleth 1.2.1\0" + VALUE "ProductVersion", "1, 2, 1, 0\0" + VALUE "SpecialBuild", "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + -- 2.1.4