From 5a0b9578655e4717e37697e4e46eeb19fd2ecca0 Mon Sep 17 00:00:00 2001 From: cantor Date: Mon, 5 Feb 2007 02:41:09 +0000 Subject: [PATCH] Removed MySQL cache. git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/trunk@2157 cb58f699-b61c-0410-a6fe-9272a202ed29 --- Makefile.am | 3 +- configure.ac | 140 +---- shib-mysql-ccache/.cvsignore | 13 - shib-mysql-ccache/Makefile.am | 23 - shib-mysql-ccache/resource.h | 15 - shib-mysql-ccache/shib-mysql-ccache.cpp | 963 ----------------------------- shib-mysql-ccache/shib_mysql_ccache.dsp | 103 --- shib-mysql-ccache/shib_mysql_ccache.rc | 109 ---- shib-mysql-ccache/shib_mysql_ccache.vcproj | 231 ------- 9 files changed, 2 insertions(+), 1598 deletions(-) delete mode 100644 shib-mysql-ccache/.cvsignore delete mode 100644 shib-mysql-ccache/Makefile.am delete mode 100644 shib-mysql-ccache/resource.h delete mode 100644 shib-mysql-ccache/shib-mysql-ccache.cpp delete mode 100644 shib-mysql-ccache/shib_mysql_ccache.dsp delete mode 100644 shib-mysql-ccache/shib_mysql_ccache.rc delete mode 100644 shib-mysql-ccache/shib_mysql_ccache.vcproj diff --git a/Makefile.am b/Makefile.am index c71aaf5..b006f94 100644 --- a/Makefile.am +++ b/Makefile.am @@ -22,8 +22,7 @@ WANT_SUBDIRS = @WANT_SUBDIRS@ SUBDIRS = $(WANT_SUBDIRS) DIST_SUBDIRS = doc shib schemas configs shib-target shar test \ - apache siterefresh odbc_ccache shib-mysql-ccache \ - nsapi_shib selinux + apache siterefresh odbc_ccache nsapi_shib selinux all-local: shibboleth.spec pkginfo diff --git a/configure.ac b/configure.ac index 33f0698..f1b5c80 100644 --- a/configure.ac +++ b/configure.ac @@ -192,7 +192,7 @@ saml::SAMLConfig::getConfig(); [AC_MSG_ERROR([unable to link with saml, or version too old])]) # output the underlying makefiles -WANT_SUBDIRS="doc shib schemas configs shib-target shar siterefresh test xmlproviders" +WANT_SUBDIRS="doc shib schemas configs shib-target shar siterefresh test" AC_CONFIG_FILES([Makefile doc/Makefile shib/Makefile schemas/Makefile \ configs/Makefile shib-target/Makefile shar/Makefile siterefresh/Makefile \ test/Makefile selinux/Makefile]) @@ -495,144 +495,6 @@ fi # -# Implement the checks of the MySQL Credential Cache -# -# 1) Assume the user wants MySQL; if it's not found then just continue without -# 2) If the user specifically requested Mysql, look for it and ERROR if not found -# 3) If the user specifically requested no-mysql, don't build it. -# - -AC_CONFIG_FILES([shib-mysql-ccache/Makefile]) - -# determine whether we should enable the mysql ccache -AC_ARG_ENABLE([mysql], - AC_HELP_STRING([--disable-mysql], [disable the MySQL Credential Cache]), - [mysql_enabled=$enableval], [mysql_enabled=default]) - -if test "x$mysql_enabled" = "x" ; then - mysql_enabled=yes -fi - -# Are we trying to build MySQL? -AC_MSG_CHECKING(whether to build the MySQL ccache) -if test "$mysql_enabled" = "yes" ; then - build_mysql=yes - AC_MSG_RESULT(yes) -elif test "$mysql_enabled" = "default" ; then - build_mysql=yes - AC_MSG_RESULT([yes, if it can be found]) -else - build_mysql=no - AC_MSG_RESULT(no) -fi - -# If we're trying to build MySQL, try to find the mysql_config program, -# verify we've got mysql >= 4, and make sure we can build with mysqld -if test "$build_mysql" = "yes" ; then - mysql_dir="" - AC_ARG_WITH(mysql, - AC_HELP_STRING([--with-mysql=PATH], [directory where mysql is installed]), - [if test "$with_mysql" = no ; then - AC_MSG_ERROR([Try running --disable-mysql instead.]) - elif test "$with_mysql" != yes ; then - mysql_dir="$with_mysql/bin" - fi ]) - - # Try to find the mysql_config program - AC_PATH_PROG(MYSQL_CONFIG, mysql_config, no, $mysql_dir $PATH ) - - if test "$MYSQL_CONFIG" = no ; then - if test "$mysql_enabled" = "yes" ; then - AC_MSG_ERROR(Cannot find mysql_config) - else - AC_MSG_WARN(MySQL not found. skipping.) - fi - fi -fi - -# if we found mysql_config then build_mysql is 'yes' -if test "$MYSQL_CONFIG" != no ; then - AC_MSG_CHECKING(for mysql version >= 4) - mysql_version=`$MYSQL_CONFIG --version` - mysql_major_version=`echo $mysql_version | awk -F. '{print $1}'` - mysql_version_ok=yes - if test $mysql_major_version -lt 4 ; then - mysql_version_ok=no - if test "$mysql_enabled" = "yes" ; then - AC_MSG_ERROR(You need MySQL version >= 4, found $mysql_version) - fi - AC_MSG_RESULT(no.. skipping MySQL) - else - AC_MSG_RESULT(yes) - fi -fi - -# if mysql_version_ok is 'yes', then we've made it this far.. ;) -if test "$mysql_version_ok" = "yes" ; then - AC_MSG_CHECKING(for embedded-MySQL libraries) - MYSQL_LIBS=`$MYSQL_CONFIG --libmysqld-libs` - if test $? != 0 ; then - found_mysql=no - if test "$mysql_enabled" = "yes" ; then - AC_MSG_ERROR(Could not find the MySQL Embedded-server libraries.) - else - AC_MSG_RESULT(no.. skipping MySQL) - fi - else - found_mysql=yes - AC_MSG_RESULT(yes) - fi -fi - -# if found_mysql=yes then test that we can actually build mysql -if test "$found_mysql" = yes ; then - MYSQL_CFLAGS=`$MYSQL_CONFIG --cflags` - MYSQL_CFLAGS=`eval echo $MYSQL_CFLAGS` - MYSQL_LIBS=`eval echo $MYSQL_LIBS` - - save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $MYSQL_CFLAGS" - - AC_CHECK_HEADER([mysql.h], [have_mysql_h=yes], [have_mysql_h=no]) - if test "$have_mysql_h" = no -a "$mysql_enabled" = "yes" ; then - AC_MSG_ERROR(unable to find MySQL header files) - fi - - if test "$have_mysql_h" = yes ; then - save_LIBS="$LIBS" - LIBS="$LIBS $MYSQL_LIBS" - AC_MSG_CHECKING(if we can link againt mysql) - AC_TRY_LINK( - [#include - #include ], - [mysql_server_init(0, NULL, NULL)], - [have_mysql_libs=yes], - [have_mysql_libs=no]) - LIBS="$save_LIBS" - - if test "$have_mysql_libs" = no ; then - if test "$mysql_enabled" = "yes" ; then - AC_MSG_ERROR([unable to link with MySQL Embedded Server Library]) - else - AC_MSG_RESULT(no. skipping MySQL) - fi - fi - fi - - CPPFLAGS="$save_CPPFLAGS" -fi - -# if have_mysql_libs=yes then go ahead with building MySQL -if test "$have_mysql_libs" = yes ; then - # this AC_MSG_RESULT is from above! - AC_MSG_RESULT(yes) - WANT_SUBDIRS="$WANT_SUBDIRS shib-mysql-ccache" - AC_SUBST(MYSQL_CFLAGS) - AC_SUBST(MYSQL_LIBS) -fi - - -# # Implement the checks of the ODBC Credential Cache # # 1) Assume the user wants ODBC; if it's not found then just continue without diff --git a/shib-mysql-ccache/.cvsignore b/shib-mysql-ccache/.cvsignore deleted file mode 100644 index 9527a59..0000000 --- a/shib-mysql-ccache/.cvsignore +++ /dev/null @@ -1,13 +0,0 @@ -Makefile.in -Makefile -.libs -.deps -*.lo -*.la -*.plg -Release -Debug -*.dep -*.mak -*.user -*.aps diff --git a/shib-mysql-ccache/Makefile.am b/shib-mysql-ccache/Makefile.am deleted file mode 100644 index 887c9fa..0000000 --- a/shib-mysql-ccache/Makefile.am +++ /dev/null @@ -1,23 +0,0 @@ -AUTOMAKE_OPTIONS = foreign - -plugindir = $(libexecdir) -plugin_LTLIBRARIES = shib-mysql-ccache.la - -AM_CFLAGS = $(MYSQL_CFLAGS) -AM_CXXFLAGS = $(AM_CFLAGS) - -shib_mysql_ccache_la_LIBADD = \ - ../shib-target/libshib-target.la \ - ../shib/libshib.la \ - $(MYSQL_LIBS) - -shib_mysql_ccache_la_SOURCES = \ - shib-mysql-ccache.cpp - -shib_mysql_ccache_la_LDFLAGS = -module -avoid-version - -install-exec-hook: - for la in $(plugin_LTLIBRARIES) ; do rm -f $(DESTDIR)$(plugindir)/$$la ; done - -EXTRA_DIST = shib_mysql_ccache.vcproj shib_mysql_ccache.rc resource.h - diff --git a/shib-mysql-ccache/resource.h b/shib-mysql-ccache/resource.h deleted file mode 100644 index ddb62d9..0000000 --- a/shib-mysql-ccache/resource.h +++ /dev/null @@ -1,15 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Developer Studio generated include file. -// Used by shib_mysql_ccache.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-mysql-ccache/shib-mysql-ccache.cpp b/shib-mysql-ccache/shib-mysql-ccache.cpp deleted file mode 100644 index d8f1030..0000000 --- a/shib-mysql-ccache/shib-mysql-ccache.cpp +++ /dev/null @@ -1,963 +0,0 @@ -/* - * Copyright 2001-2007 Internet2 - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * shib-mysql-ccache.cpp: Shibboleth Credential Cache using MySQL. - * - * Created by: Derek Atkins - * - * $Id$ - */ - -// eventually we might be able to support autoconf via cygwin... -#if defined (_MSC_VER) || defined(__BORLANDC__) -# include "config_win32.h" -#else -# include "config.h" -#endif - -#ifdef WIN32 -# define SHIBMYSQL_EXPORTS __declspec(dllexport) -#else -# define SHIBMYSQL_EXPORTS -#endif - -#ifdef HAVE_UNISTD_H -# include -#endif - -#include - -#include -#include -#include -#include -#include -using xmltooling::XMLHelper; - -#include - -#ifdef WIN32 -# include -#endif -#include - -// wanted to use MySQL codes for this, but can't seem to get back a 145 -#define isCorrupt(s) strstr(s,"(errno: 145)") - -#ifdef HAVE_LIBDMALLOCXX -#include -#endif - -using namespace shibsp; -using namespace shibtarget; -using namespace opensaml::saml2md; -using namespace saml; -using namespace log4cpp; -using namespace std; - -#define PLUGIN_VER_MAJOR 3 -#define PLUGIN_VER_MINOR 0 - -#define STATE_TABLE \ - "CREATE TABLE state (" \ - "cookie VARCHAR(64) PRIMARY KEY, " \ - "application_id VARCHAR(255)," \ - "ctime TIMESTAMP," \ - "atime TIMESTAMP," \ - "addr VARCHAR(128)," \ - "major INT," \ - "minor INT," \ - "provider VARCHAR(256)," \ - "subject TEXT," \ - "authn_context TEXT," \ - "tokens TEXT)" - -#define REPLAY_TABLE \ - "CREATE TABLE replay (id VARCHAR(255) PRIMARY KEY, " \ - "expires TIMESTAMP, " \ - "INDEX (expires))" - -static const XMLCh Argument[] = -{ chLatin_A, chLatin_r, chLatin_g, chLatin_u, chLatin_m, chLatin_e, chLatin_n, chLatin_t, chNull }; -static const XMLCh cleanupInterval[] = -{ chLatin_c, chLatin_l, chLatin_e, chLatin_a, chLatin_n, chLatin_u, chLatin_p, - chLatin_I, chLatin_n, chLatin_t, chLatin_e, chLatin_r, chLatin_v, chLatin_a, chLatin_l, chNull -}; -static const XMLCh cacheTimeout[] = -{ chLatin_c, chLatin_a, chLatin_c, chLatin_h, chLatin_e, chLatin_T, chLatin_i, chLatin_m, chLatin_e, chLatin_o, chLatin_u, chLatin_t, chNull }; -static const XMLCh mysqlTimeout[] = -{ chLatin_m, chLatin_y, chLatin_s, chLatin_q, chLatin_l, chLatin_T, chLatin_i, chLatin_m, chLatin_e, chLatin_o, chLatin_u, chLatin_t, chNull }; -static const XMLCh storeAttributes[] = -{ chLatin_s, chLatin_t, chLatin_o, chLatin_r, chLatin_e, chLatin_A, chLatin_t, chLatin_t, chLatin_r, chLatin_i, chLatin_b, chLatin_u, chLatin_t, chLatin_e, chLatin_s, chNull }; - -static bool g_MySQLInitialized = false; - -class MySQLBase : public virtual saml::IPlugIn -{ -public: - MySQLBase(const DOMElement* e); - virtual ~MySQLBase(); - - MYSQL* getMYSQL(); - bool repairTable(MYSQL*&, const char* table); - - log4cpp::Category* log; - -protected: - xmltooling::ThreadKey* m_mysql; - const DOMElement* m_root; // can only use this during initialization - - bool initialized; - bool handleShutdown; - - void createDatabase(MYSQL*, int major, int minor); - void upgradeDatabase(MYSQL*); - pair getVersion(MYSQL*); -}; - -// Forward declarations -static void mysqlInit(const DOMElement* e, Category& log); - -extern "C" void shib_mysql_destroy_handle(void* data) -{ - MYSQL* mysql = (MYSQL*) data; - if (mysql) mysql_close(mysql); -} - -MySQLBase::MySQLBase(const DOMElement* e) : m_root(e) -{ -#ifdef _DEBUG - xmltooling::NDC ndc("MySQLBase"); -#endif - log = &(Category::getInstance("shibtarget.SessionCache.MySQL")); - - m_mysql = xmltooling::ThreadKey::create(&shib_mysql_destroy_handle); - - initialized = false; - mysqlInit(e,*log); - getMYSQL(); - initialized = true; -} - -MySQLBase::~MySQLBase() -{ - delete m_mysql; -} - -MYSQL* MySQLBase::getMYSQL() -{ -#ifdef _DEBUG - xmltooling::NDC ndc("getMYSQL"); -#endif - - // Do we already have a handle? - MYSQL* mysql=reinterpret_cast(m_mysql->getData()); - if (mysql) - return mysql; - - // Connect to the database - mysql = mysql_init(NULL); - if (!mysql) { - log->error("mysql_init failed"); - mysql_close(mysql); - throw SAMLException("MySQLBase::getMYSQL(): mysql_init() failed"); - } - - if (!mysql_real_connect(mysql, NULL, NULL, NULL, "shibd", 0, NULL, 0)) { - if (initialized) { - log->crit("mysql_real_connect failed: %s", mysql_error(mysql)); - mysql_close(mysql); - throw SAMLException("MySQLBase::getMYSQL(): mysql_real_connect() failed"); - } - else { - log->info("mysql_real_connect failed: %s. Trying to create", mysql_error(mysql)); - - // This will throw an exception if it fails. - createDatabase(mysql, PLUGIN_VER_MAJOR, PLUGIN_VER_MINOR); - } - } - - pair v=getVersion (mysql); - - // Make sure we've got the right version - if (v.first != PLUGIN_VER_MAJOR || v.second != PLUGIN_VER_MINOR) { - - // If we're capable, try upgrading on the fly... - if (v.first == 0 || v.first == 1 || v.first == 2) { - if (mysql_query(mysql, "DROP TABLE state")) { - log->error("error dropping old session state table: %s", mysql_error(mysql)); - } - if (v.first==2 && mysql_query(mysql, "DROP TABLE replay")) { - log->error("error dropping old session state table: %s", mysql_error(mysql)); - } - upgradeDatabase(mysql); - } - else { - mysql_close(mysql); - log->crit("Unknown database version: %d.%d", v.first, v.second); - throw SAMLException("MySQLBase::getMYSQL(): Unknown database version"); - } - } - - // We're all set.. Save off the handle for this thread. - m_mysql->setData(mysql); - return mysql; -} - -bool MySQLBase::repairTable(MYSQL*& mysql, const char* table) -{ - string q = string("REPAIR TABLE ") + table; - if (mysql_query(mysql, q.c_str())) { - log->error("Error repairing table %s: %s", table, mysql_error(mysql)); - return false; - } - - // seems we have to recycle the connection to get the thread to keep working - // other threads seem to be ok, but we should monitor that - mysql_close(mysql); - m_mysql->setData(NULL); - mysql=getMYSQL(); - return true; -} - -void MySQLBase::createDatabase(MYSQL* mysql, int major, int minor) -{ - log->info("creating database"); - - MYSQL* ms = NULL; - try { - ms = mysql_init(NULL); - if (!ms) { - log->crit("mysql_init failed"); - throw SAMLException("ShibMySQLCCache::createDatabase(): mysql_init failed"); - } - - if (!mysql_real_connect(ms, NULL, NULL, NULL, NULL, 0, NULL, 0)) { - log->crit("cannot open DB file to create DB: %s", mysql_error(ms)); - throw SAMLException("ShibMySQLCCache::createDatabase(): mysql_real_connect failed"); - } - - if (mysql_query(ms, "CREATE DATABASE shibd")) { - log->crit("cannot create shibd database: %s", mysql_error(ms)); - throw SAMLException("ShibMySQLCCache::createDatabase(): create db cmd failed"); - } - - if (!mysql_real_connect(mysql, NULL, NULL, NULL, "shibd", 0, NULL, 0)) { - log->crit("cannot open shibd database"); - throw SAMLException("ShibMySQLCCache::createDatabase(): mysql_real_connect to plugin db failed"); - } - - mysql_close(ms); - - } - catch (SAMLException&) { - if (ms) - mysql_close(ms); - mysql_close(mysql); - throw; - } - - // Now create the tables if they don't exist - log->info("Creating database tables"); - - if (mysql_query(mysql, "CREATE TABLE version (major INT, minor INT)")) { - log->error ("error creating version: %s", mysql_error(mysql)); - throw SAMLException("ShibMySQLCCache::createDatabase(): create table cmd failed"); - } - - if (mysql_query(mysql,STATE_TABLE)) { - log->error ("error creating state table: %s", mysql_error(mysql)); - throw SAMLException("ShibMySQLCCache::createDatabase(): create table cmd failed"); - } - - if (mysql_query(mysql,REPLAY_TABLE)) { - log->error ("error creating replay table: %s", mysql_error(mysql)); - throw SAMLException("ShibMySQLCCache::createDatabase(): create table cmd failed"); - } - - ostringstream q; - q << "INSERT INTO version VALUES(" << major << "," << minor << ")"; - if (mysql_query(mysql, q.str().c_str())) { - log->error ("error setting version: %s", mysql_error(mysql)); - throw SAMLException("ShibMySQLCCache::createDatabase(): version insert failed"); - } -} - -void MySQLBase::upgradeDatabase(MYSQL* mysql) -{ - if (mysql_query(mysql,STATE_TABLE)) { - log->error ("error creating state table: %s", mysql_error(mysql)); - throw SAMLException("ShibMySQLCCache::upgradeDatabase(): error creating state table"); - } - - if (mysql_query(mysql,REPLAY_TABLE)) { - log->error ("error creating replay table: %s", mysql_error(mysql)); - throw SAMLException("ShibMySQLCCache::upgradeDatabase(): error creating replay table"); - } - - ostringstream q; - q << "UPDATE version SET major = " << PLUGIN_VER_MAJOR; - if (mysql_query(mysql, q.str().c_str())) { - log->error ("error updating version: %s", mysql_error(mysql)); - throw SAMLException("ShibMySQLCCache::upgradeDatabase(): error updating version"); - } -} - -pair MySQLBase::getVersion(MYSQL* mysql) -{ - // grab the version number from the database - if (mysql_query(mysql, "SELECT * FROM version")) { - log->error("error reading version: %s", mysql_error(mysql)); - throw SAMLException("MySQLBase::getVersion(): error reading version"); - } - - MYSQL_RES* rows = mysql_store_result(mysql); - if (rows) { - if (mysql_num_rows(rows) == 1 && mysql_num_fields(rows) == 2) { - MYSQL_ROW row = mysql_fetch_row(rows); - int major = row[0] ? atoi(row[0]) : -1; - int minor = row[1] ? atoi(row[1]) : -1; - log->debug("opening database version %d.%d", major, minor); - mysql_free_result(rows); - return make_pair(major,minor); - } - else { - // Wrong number of rows or wrong number of fields... - log->crit("Houston, we've got a problem with the database..."); - mysql_free_result(rows); - throw SAMLException("MySQLBase::getVersion(): version verification failed"); - } - } - log->crit("MySQL Read Failed in version verification"); - throw SAMLException("MySQLBase::getVersion(): error reading version"); -} - -static void mysqlInit(const DOMElement* e, Category& log) -{ - if (g_MySQLInitialized) { - log.info("MySQL embedded server already initialized"); - return; - } - log.info("initializing MySQL embedded server"); - - // Setup the argument array - vector arg_array; - arg_array.push_back("shibboleth"); - - // grab any MySQL parameters from the config file - e=XMLHelper::getFirstChildElement(e,Argument); - while (e) { - auto_ptr_char arg(e->getFirstChild()->getNodeValue()); - if (arg.get()) - arg_array.push_back(arg.get()); - e=XMLHelper::getNextSiblingElement(e,Argument); - } - - // Compute the argument array - vector::size_type arg_count = arg_array.size(); - const char** args=new const char*[arg_count]; - for (vector::size_type i = 0; i < arg_count; i++) - args[i] = arg_array[i].c_str(); - - // Initialize MySQL with the arguments - mysql_server_init(arg_count, (char **)args, NULL); - - delete[] args; - g_MySQLInitialized = true; -} - -class ShibMySQLCCache : public MySQLBase, virtual public ISessionCache, virtual public ISessionCacheStore -{ -public: - ShibMySQLCCache(const DOMElement* e); - virtual ~ShibMySQLCCache(); - - // Delegate all the ISessionCache methods. - string insert( - const IApplication* application, - const RoleDescriptor* role, - const char* client_addr, - const SAMLSubject* subject, - const char* authnContext, - const SAMLResponse* tokens - ) - { return m_cache->insert(application,role,client_addr,subject,authnContext,tokens); } - ISessionCacheEntry* find(const char* key, const IApplication* application, const char* client_addr) - { return m_cache->find(key,application,client_addr); } - void remove(const char* key, const IApplication* application, const char* client_addr) - { m_cache->remove(key,application,client_addr); } - - bool setBackingStore(ISessionCacheStore*) {return false;} - - // Store methods handle the database work - HRESULT onCreate( - const char* key, - const IApplication* application, - const ISessionCacheEntry* entry, - int majorVersion, - int minorVersion, - time_t created - ); - HRESULT onRead( - const char* key, - string& applicationId, - string& clientAddress, - string& providerId, - string& subject, - string& authnContext, - string& tokens, - int& majorVersion, - int& minorVersion, - time_t& created, - time_t& accessed - ); - HRESULT onRead(const char* key, time_t& accessed); - HRESULT onRead(const char* key, string& tokens); - HRESULT onUpdate(const char* key, const char* tokens=NULL, time_t accessed=0); - HRESULT onDelete(const char* key); - - void cleanup(); - -private: - bool m_storeAttributes; - ISessionCache* m_cache; - xmltooling::CondWait* shutdown_wait; - bool shutdown; - xmltooling::Thread* cleanup_thread; - - static void* cleanup_fcn(void*); // XXX Assumed an ShibMySQLCCache -}; - -ShibMySQLCCache::ShibMySQLCCache(const DOMElement* e) : MySQLBase(e), m_storeAttributes(false) -{ -#ifdef _DEBUG - xmltooling::NDC ndc("ShibMySQLCCache"); -#endif - - m_cache = dynamic_cast( - SAMLConfig::getConfig().getPlugMgr().newPlugin(MEMORY_SESSIONCACHE, e) - ); - if (!m_cache->setBackingStore(this)) { - delete m_cache; - throw SAMLException("Unable to register MySQL cache plugin as a cache store."); - } - - shutdown_wait = xmltooling::CondWait::create(); - shutdown = false; - - // Load our configuration details... - const XMLCh* tag=m_root->getAttributeNS(NULL,storeAttributes); - if (tag && *tag && (*tag==chLatin_t || *tag==chDigit_1)) - m_storeAttributes=true; - - // Initialize the cleanup thread - cleanup_thread = xmltooling::Thread::create(&cleanup_fcn, (void*)this); -} - -ShibMySQLCCache::~ShibMySQLCCache() -{ - shutdown = true; - shutdown_wait->signal(); - cleanup_thread->join(NULL); - delete m_cache; -} - -HRESULT ShibMySQLCCache::onCreate( - const char* key, - const IApplication* application, - const ISessionCacheEntry* entry, - int majorVersion, - int minorVersion, - time_t created - ) -{ -#ifdef _DEBUG - xmltooling::NDC ndc("onCreate"); -#endif - - // Get XML data from entry. Default is not to return SAML objects. - const char* context=entry->getAuthnContext(); - pair subject=entry->getSubject(); - pair tokens=entry->getTokens(); - - ostringstream q; - q << "INSERT INTO state VALUES('" << key << "','" << application->getId() << "',"; - if (created==0) - q << "NOW(),NOW(),'"; - else - q << "FROM_UNIXTIME(" << created << "),NOW(),'"; - q << entry->getClientAddress() << "'," << majorVersion << "," << minorVersion << ",'" << entry->getProviderId() << "','" - << subject.first << "','" << context << "',"; - - if (m_storeAttributes && tokens.first) - q << "'" << tokens.first << "')"; - else - q << "null)"; - - if (log->isDebugEnabled()) - log->debug("SQL insert: %s", q.str().c_str()); - - // then add it to the database - MYSQL* mysql = getMYSQL(); - if (mysql_query(mysql, q.str().c_str())) { - const char* err=mysql_error(mysql); - log->error("error inserting %s: %s", key, err); - if (isCorrupt(err) && repairTable(mysql,"state")) { - // Try again... - if (mysql_query(mysql, q.str().c_str())) { - log->error("error inserting %s: %s", key, mysql_error(mysql)); - return E_FAIL; - } - } - else - throw E_FAIL; - } - - return NOERROR; -} - -HRESULT ShibMySQLCCache::onRead( - const char* key, - string& applicationId, - string& clientAddress, - string& providerId, - string& subject, - string& authnContext, - string& tokens, - int& majorVersion, - int& minorVersion, - time_t& created, - time_t& accessed - ) -{ -#ifdef _DEBUG - xmltooling::NDC ndc("onRead"); -#endif - - log->debug("searching MySQL database..."); - - string q = string("SELECT application_id,UNIX_TIMESTAMP(ctime),UNIX_TIMESTAMP(atime),addr,major,minor,provider,subject,authn_context,tokens FROM state WHERE cookie='") + key + "' LIMIT 1"; - - MYSQL* mysql = getMYSQL(); - if (mysql_query(mysql, q.c_str())) { - const char* err=mysql_error(mysql); - log->error("error searching for %s: %s", key, err); - if (isCorrupt(err) && repairTable(mysql,"state")) { - if (mysql_query(mysql, q.c_str())) - log->error("error retrying search for %s: %s", key, mysql_error(mysql)); - } - } - - MYSQL_RES* rows = mysql_store_result(mysql); - - // Nope, doesn't exist. - if (!rows || mysql_num_rows(rows)==0) { - log->debug("not found in database"); - if (rows) - mysql_free_result(rows); - return S_FALSE; - } - - // Make sure we got 1 and only 1 row. - if (mysql_num_rows(rows) > 1) { - log->error("database select returned %d rows!", mysql_num_rows(rows)); - mysql_free_result(rows); - return E_FAIL; - } - - log->debug("session found, tranfering data back into memory"); - - /* Columns in query: - 0: application_id - 1: ctime - 2: atime - 3: address - 4: major - 5: minor - 6: provider - 7: subject - 8: authncontext - 9: tokens - */ - - MYSQL_ROW row = mysql_fetch_row(rows); - applicationId=row[0]; - created=atoi(row[1]); - accessed=atoi(row[2]); - clientAddress=row[3]; - majorVersion=atoi(row[4]); - minorVersion=atoi(row[5]); - providerId=row[6]; - subject=row[7]; - authnContext=row[8]; - if (row[9]) - tokens=row[9]; - - // Free the results. - mysql_free_result(rows); - - return NOERROR; -} - -HRESULT ShibMySQLCCache::onRead(const char* key, time_t& accessed) -{ -#ifdef _DEBUG - xmltooling::NDC ndc("onRead"); -#endif - - log->debug("reading last access time from MySQL database"); - - string q = string("SELECT UNIX_TIMESTAMP(atime) FROM state WHERE cookie='") + key + "' LIMIT 1"; - - MYSQL* mysql = getMYSQL(); - if (mysql_query(mysql, q.c_str())) { - const char* err=mysql_error(mysql); - log->error("error searching for %s: %s", key, err); - if (isCorrupt(err) && repairTable(mysql,"state")) { - if (mysql_query(mysql, q.c_str())) - log->error("error retrying search for %s: %s", key, mysql_error(mysql)); - } - } - - MYSQL_RES* rows = mysql_store_result(mysql); - - // Nope, doesn't exist. - if (!rows || mysql_num_rows(rows)==0) { - log->warn("session expected, but not found in database"); - if (rows) - mysql_free_result(rows); - return S_FALSE; - } - - // Make sure we got 1 and only 1 row. - if (mysql_num_rows(rows) != 1) { - log->error("database select returned %d rows!", mysql_num_rows(rows)); - mysql_free_result(rows); - return E_FAIL; - } - - MYSQL_ROW row = mysql_fetch_row(rows); - accessed=atoi(row[0]); - - // Free the results. - mysql_free_result(rows); - - return NOERROR; -} - -HRESULT ShibMySQLCCache::onRead(const char* key, string& tokens) -{ -#ifdef _DEBUG - xmltooling::NDC ndc("onRead"); -#endif - - if (!m_storeAttributes) - return S_FALSE; - - log->debug("reading cached tokens from MySQL database"); - - string q = string("SELECT tokens FROM state WHERE cookie='") + key + "' LIMIT 1"; - - MYSQL* mysql = getMYSQL(); - if (mysql_query(mysql, q.c_str())) { - const char* err=mysql_error(mysql); - log->error("error searching for %s: %s", key, err); - if (isCorrupt(err) && repairTable(mysql,"state")) { - if (mysql_query(mysql, q.c_str())) - log->error("error retrying search for %s: %s", key, mysql_error(mysql)); - } - } - - MYSQL_RES* rows = mysql_store_result(mysql); - - // Nope, doesn't exist. - if (!rows || mysql_num_rows(rows)==0) { - log->warn("session expected, but not found in database"); - if (rows) - mysql_free_result(rows); - return S_FALSE; - } - - // Make sure we got 1 and only 1 row. - if (mysql_num_rows(rows) != 1) { - log->error("database select returned %d rows!", mysql_num_rows(rows)); - mysql_free_result(rows); - return E_FAIL; - } - - MYSQL_ROW row = mysql_fetch_row(rows); - if (row[0]) - tokens=row[0]; - - // Free the results. - mysql_free_result(rows); - - return NOERROR; -} - -HRESULT ShibMySQLCCache::onUpdate(const char* key, const char* tokens, time_t lastAccess) -{ -#ifdef _DEBUG - xmltooling::NDC ndc("onUpdate"); -#endif - - ostringstream q; - if (lastAccess>0) - q << "UPDATE state SET atime=FROM_UNIXTIME(" << lastAccess << ")"; - else if (tokens) { - if (!m_storeAttributes) - return S_FALSE; - q << "UPDATE state SET tokens="; - if (*tokens) - q << "'" << tokens << "'"; - else - q << "null"; - } - else { - log->warn("onUpdate called with nothing to do!"); - return S_FALSE; - } - - q << " WHERE cookie='" << key << "'"; - - MYSQL* mysql = getMYSQL(); - if (mysql_query(mysql, q.str().c_str())) { - const char* err=mysql_error(mysql); - log->error("error updating %s: %s", key, err); - if (isCorrupt(err) && repairTable(mysql,"state")) { - // Try again... - if (mysql_query(mysql, q.str().c_str())) { - log->error("error updating %s: %s", key, mysql_error(mysql)); - return E_FAIL; - } - } - else - return E_FAIL; - } - - return NOERROR; -} - -HRESULT ShibMySQLCCache::onDelete(const char* key) -{ -#ifdef _DEBUG - xmltooling::NDC ndc("onDelete"); -#endif - - // Remove from the database - string q = string("DELETE FROM state WHERE cookie='") + key + "'"; - MYSQL* mysql = getMYSQL(); - if (mysql_query(mysql, q.c_str())) { - const char* err=mysql_error(mysql); - log->error("error deleting entry %s: %s", key, err); - if (isCorrupt(err) && repairTable(mysql,"state")) { - // Try again... - if (mysql_query(mysql, q.c_str())) { - log->error("error deleting entry %s: %s", key, mysql_error(mysql)); - return E_FAIL; - } - } - else - return E_FAIL; - } - - return NOERROR; -} - -void ShibMySQLCCache::cleanup() -{ -#ifdef _DEBUG - xmltooling::NDC ndc("cleanup"); -#endif - - xmltooling::Mutex* mutex = xmltooling::Mutex::create(); - - int rerun_timer = 0; - int timeout_life = 0; - - // Load our configuration details... - const XMLCh* tag=m_root->getAttributeNS(NULL,cleanupInterval); - if (tag && *tag) - rerun_timer = XMLString::parseInt(tag); - - // search for 'mysql-cache-timeout' and then the regular cache timeout - tag=m_root->getAttributeNS(NULL,mysqlTimeout); - if (tag && *tag) - timeout_life = XMLString::parseInt(tag); - else { - tag=m_root->getAttributeNS(NULL,cacheTimeout); - if (tag && *tag) - timeout_life = XMLString::parseInt(tag); - } - - if (rerun_timer <= 0) - rerun_timer = 300; // rerun every 5 minutes - - if (timeout_life <= 0) - timeout_life = 28800; // timeout after 8 hours - - mutex->lock(); - - MYSQL* mysql = getMYSQL(); - - log->info("cleanup thread started...Run every %d secs; timeout after %d secs", rerun_timer, timeout_life); - - while (shutdown == false) { - shutdown_wait->timedwait(mutex, rerun_timer); - - if (shutdown == true) - break; - - // Find all the entries in the database that haven't been used - // recently In particular, find all entries that have not been - // accessed in 'timeout_life' seconds. - ostringstream q; - q << "DELETE FROM state WHERE " << "UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(atime) >= " << timeout_life; - - if (mysql_query(mysql, q.str().c_str())) { - const char* err=mysql_error(mysql); - log->error("error purging old records: %s", err); - if (isCorrupt(err) && repairTable(mysql,"state")) { - if (mysql_query(mysql, q.str().c_str())) - log->error("error re-purging old records: %s", mysql_error(mysql)); - } - } - } - - log->info("cleanup thread exiting..."); - - mutex->unlock(); - delete mutex; - xmltooling::Thread::exit(NULL); -} - -void* ShibMySQLCCache::cleanup_fcn(void* cache_p) -{ - ShibMySQLCCache* cache = (ShibMySQLCCache*)cache_p; - -#ifndef WIN32 - // First, let'block all signals - xmltooling::Thread::mask_all_signals(); -#endif - - // Now run the cleanup process. - cache->cleanup(); - return NULL; -} - -class MySQLReplayCache : public MySQLBase, virtual public IReplayCache -{ -public: - MySQLReplayCache(const DOMElement* e); - virtual ~MySQLReplayCache() {} - - bool check(const XMLCh* str, time_t expires) {auto_ptr_XMLCh temp(str); return check(temp.get(),expires);} - bool check(const char* str, time_t expires); -}; - -MySQLReplayCache::MySQLReplayCache(const DOMElement* e) : MySQLBase(e) {} - -bool MySQLReplayCache::check(const char* str, time_t expires) -{ -#ifdef _DEBUG - xmltooling::NDC ndc("check"); -#endif - - // Remove expired entries - string q = string("DELETE FROM replay WHERE expires < NOW()"); - MYSQL* mysql = getMYSQL(); - if (mysql_query(mysql, q.c_str())) { - const char* err=mysql_error(mysql); - log->error("Error deleting expired entries: %s", err); - if (isCorrupt(err) && repairTable(mysql,"replay")) { - // Try again... - if (mysql_query(mysql, q.c_str())) - log->error("Error deleting expired entries: %s", mysql_error(mysql)); - } - } - - string q2 = string("SELECT id FROM replay WHERE id='") + str + "'"; - if (mysql_query(mysql, q2.c_str())) { - const char* err=mysql_error(mysql); - log->error("Error searching for %s: %s", str, err); - if (isCorrupt(err) && repairTable(mysql,"replay")) { - if (mysql_query(mysql, q2.c_str())) { - log->error("Error retrying search for %s: %s", str, mysql_error(mysql)); - throw SAMLException("Replay cache failed, please inform application support staff."); - } - } - else - throw SAMLException("Replay cache failed, please inform application support staff."); - } - - // Did we find it? - MYSQL_RES* rows = mysql_store_result(mysql); - if (rows && mysql_num_rows(rows)>0) { - mysql_free_result(rows); - return false; - } - - ostringstream q3; - q3 << "INSERT INTO replay VALUES('" << str << "'," << "FROM_UNIXTIME(" << expires << "))"; - - // then add it to the database - if (mysql_query(mysql, q3.str().c_str())) { - const char* err=mysql_error(mysql); - log->error("Error inserting %s: %s", str, err); - if (isCorrupt(err) && repairTable(mysql,"state")) { - // Try again... - if (mysql_query(mysql, q3.str().c_str())) { - log->error("Error inserting %s: %s", str, mysql_error(mysql)); - throw SAMLException("Replay cache failed, please inform application support staff."); - } - } - else - throw SAMLException("Replay cache failed, please inform application support staff."); - } - - return true; -} - -/************************************************************************* - * The registration functions here... - */ - -SessionCache* new_mysql_ccache(const DOMElement* const & e) -{ - return new ShibMySQLCCache(e); -} - -IPlugIn* new_mysql_replay(const DOMElement* e) -{ - return new MySQLReplayCache(e); -} - -extern "C" int SHIBMYSQL_EXPORTS saml_extension_init(void*) -{ - // register this ccache type - SAMLConfig::getConfig().getPlugMgr().regFactory(MYSQL_REPLAYCACHE, &new_mysql_replay); - SPConfig::getConfig().SessionCacheManager.registerFactory(MYSQL_SESSIONCACHE, &new_mysql_ccache); - return 0; -} - -extern "C" void SHIBMYSQL_EXPORTS saml_extension_term() -{ - // Shutdown MySQL - if (g_MySQLInitialized) - mysql_server_end(); - SAMLConfig::getConfig().getPlugMgr().unregFactory(MYSQL_REPLAYCACHE); -} diff --git a/shib-mysql-ccache/shib_mysql_ccache.dsp b/shib-mysql-ccache/shib_mysql_ccache.dsp deleted file mode 100644 index f0d6080..0000000 --- a/shib-mysql-ccache/shib_mysql_ccache.dsp +++ /dev/null @@ -1,103 +0,0 @@ -# Microsoft Developer Studio Project File - Name="shib_mysql_ccache" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=shib_mysql_ccache - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "shib_mysql_ccache.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "shib_mysql_ccache.mak" CFG="shib_mysql_ccache - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "shib_mysql_ccache - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "shib_mysql_ccache - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "shib_mysql_ccache - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SHIB_MYSQL_CCACHE_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I ".." /I "..\..\..\opensaml\c" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /YX /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 log4cpp.lib libmysqld.lib xerces-c_2.lib saml_5.lib /nologo /dll /machine:I386 /out:"Release/shib-mysql-ccache.so" /libpath:"..\..\..\opensaml\c\saml\Release" /libpath:"\mysql-4.1.12\lib_release" - -!ELSEIF "$(CFG)" == "shib_mysql_ccache - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SHIB_MYSQL_CCACHE_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I ".." /I "..\..\..\opensaml\c" /D "_WINDOWS" /D "WIN32" /D "_DEBUG" /D "_MBCS" /FR /YX /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 log4cppD.lib libmysqld.lib xerces-c_2D.lib saml_5D.lib /nologo /dll /debug /machine:I386 /out:"Debug/shib-mysql-ccache.so" /pdbtype:sept /libpath:"..\..\..\opensaml\c\saml\Debug" /libpath:"\mysql-4.1.12\lib_debug" - -!ENDIF - -# Begin Target - -# Name "shib_mysql_ccache - Win32 Release" -# Name "shib_mysql_ccache - Win32 Debug" -# Begin Source File - -SOURCE=.\resource.h -# End Source File -# Begin Source File - -SOURCE=".\shib-mysql-ccache.cpp" -# End Source File -# Begin Source File - -SOURCE=.\shib_mysql_ccache.rc -# End Source File -# End Target -# End Project diff --git a/shib-mysql-ccache/shib_mysql_ccache.rc b/shib-mysql-ccache/shib_mysql_ccache.rc deleted file mode 100644 index 2279299..0000000 --- a/shib-mysql-ccache/shib_mysql_ccache.rc +++ /dev/null @@ -1,109 +0,0 @@ -//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 1,3,0,0 - PRODUCTVERSION 1,3,0,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", "Internet2\0" - VALUE "FileDescription", "Shibboleth MySQL Cache Plugin\0" - VALUE "FileVersion", "1, 3, 0, 0\0" - VALUE "InternalName", "shib-mysql-ccache\0" - VALUE "LegalCopyright", "Copyright © 2005 Internet2\0" - VALUE "LegalTrademarks", "\0" - VALUE "OriginalFilename", "shib-mysql-ccache.so\0" - VALUE "PrivateBuild", "\0" - VALUE "ProductName", "Shibboleth 1.3\0" - VALUE "ProductVersion", "1, 3, 0, 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 - diff --git a/shib-mysql-ccache/shib_mysql_ccache.vcproj b/shib-mysql-ccache/shib_mysql_ccache.vcproj deleted file mode 100644 index 0c6b5c0..0000000 --- a/shib-mysql-ccache/shib_mysql_ccache.vcproj +++ /dev/null @@ -1,231 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- 2.1.4