[shibboleth-sp2] 83/119: Convert ENDLINE refs to eol. Make configure script check for proper logging version.

Ferenc Wágner wferi-guest at moszumanska.debian.org
Tue Jan 26 21:29:53 UTC 2016


This is an automated email from the git hooks/post-receive script.

wferi-guest pushed a commit to annotated tag 1.3.1
in repository shibboleth-sp2.

commit 521f958e22854582233bfae2e16b13b7524f15da
Author: Scott Cantor <cantor.2 at osu.edu>
Date:   Thu Oct 11 16:44:51 2007 +0000

    Convert ENDLINE refs to eol.
    Make configure script check for proper logging version.
---
 configure.ac                      | 15 +++++++--------
 shib-target/ArtifactMapper.cpp    |  4 ++--
 shib-target/RPCListener.cpp       |  6 +++---
 shib-target/XMLRequestMapper.cpp  |  2 +-
 shib-target/shib-ini.cpp          |  4 ++--
 shib/ReloadableXMLFile.cpp        |  8 ++++----
 shib/ShibbolethTrust.cpp          |  6 +++---
 siterefresh/siterefresh.cpp       | 10 +++++-----
 xmlproviders/XMLAAP.cpp           |  4 ++--
 xmlproviders/XMLAccessControl.cpp |  2 +-
 xmlproviders/XMLCredentials.cpp   |  2 +-
 xmlproviders/XMLMetadata.cpp      |  6 +++---
 xmlproviders/XMLProviders.cpp     |  4 ++--
 xmlproviders/XMLTrust.cpp         |  4 ++--
 14 files changed, 38 insertions(+), 39 deletions(-)

diff --git a/configure.ac b/configure.ac
index 3c6d1e0..dd60dc8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -167,10 +167,10 @@ AC_ARG_WITH(log4shib,
 if test -f "${LOG4SHIB_CONFIG}"; then
     LDFLAGS="`${LOG4SHIB_CONFIG} --libs` $LDFLAGS"
     CPPFLAGS="`${LOG4SHIB_CONFIG} --cflags` $CPPFLAGS"
-	AC_CHECK_HEADER([log4shib/Category.hh],,AC_MSG_ERROR([unable to find log4shib header files]))
+	AC_CHECK_HEADER([log4shib/CategoryStream.hh],,AC_MSG_ERROR([unable to find log4shib header files]))
 	AC_TRY_LINK(
-		[#include <log4shib/Category.hh>],
-		[log4shib::Category::getInstance("foo")],
+		[#include <log4shib/CategoryStream.hh>],
+		[log4shib::Category::getInstance("foo").errorStream() << log4shib::eol],
 		[AC_DEFINE(HAVE_LOG4SHIB,1,[Define if log4shib library is used.])],
 		[AC_MSG_ERROR([unable to link with log4shib])])
 else
@@ -191,13 +191,12 @@ else
 		AC_MSG_WARN([will try to use log4cpp, note that most non-Internet2 supplied versions are not thread-safe])
 	    LDFLAGS="`${LOG4CPP_CONFIG} --libs` $LDFLAGS"
 	    CPPFLAGS="`${LOG4CPP_CONFIG} --cflags` $CPPFLAGS"
-		AC_CHECK_HEADER([log4cpp/Category.hh],,AC_MSG_ERROR([unable to find log4cpp header files]))
-		AC_CHECK_HEADER([log4cpp/PropertyConfigurator.hh],,AC_MSG_ERROR([you need at least log4cpp 0.3.x]))
+		AC_CHECK_HEADER([log4cpp/CategoryStream.hh],,AC_MSG_ERROR([unable to find log4cpp header files]))
 		AC_TRY_LINK(
-			[#include <log4cpp/Category.hh>],
-			[log4cpp::Category::getInstance("foo")],
+			[#include <log4cpp/CategoryStream.hh>],
+			[log4cpp::Category::getInstance("foo").errorStream() << log4cpp::eol],
 			[AC_DEFINE(HAVE_LOG4CPP,1,[Define if log4cpp library is used.])],
-			[AC_MSG_ERROR([unable to link with log4cpp])])
+			[AC_MSG_ERROR([unable to link with log4cpp, at least version 1.0 needed])])
 	else
 	    AC_MSG_ERROR([log4cpp-config not found, may need to use --with-log4cpp option])
 	fi
diff --git a/shib-target/ArtifactMapper.cpp b/shib-target/ArtifactMapper.cpp
index d51989b..1da815d 100644
--- a/shib-target/ArtifactMapper.cpp
+++ b/shib-target/ArtifactMapper.cpp
@@ -99,7 +99,7 @@ SAMLResponse* STArtifactMapper::resolve(SAMLRequest* request)
 		        try {
 		            response = binding->send(ep->getLocation(),*request,&callCtx);
 		            if (log.isDebugEnabled())
-		            	log.debugStream() << "SAML response from artifact request:\n" << *response << CategoryStream::ENDLINE;
+		            	log.debugStream() << "SAML response from artifact request:\n" << *response << logging::eol;
 		            
 		            if (!response->getAssertions().hasNext()) {
 		                delete response;
@@ -138,7 +138,7 @@ SAMLResponse* STArtifactMapper::resolve(SAMLRequest* request)
 			        try {
 			            response = binding->send(ep->getLocation(),*request,&callCtx);
 			            if (log.isDebugEnabled())
-			            	log.debugStream() << "SAML response from artifact request:\n" << *response << CategoryStream::ENDLINE;
+			            	log.debugStream() << "SAML response from artifact request:\n" << *response << logging::eol;
 			            
 			            if (!response->getAssertions().hasNext()) {
 			                delete response;
diff --git a/shib-target/RPCListener.cpp b/shib-target/RPCListener.cpp
index 1efffcd..58b184d 100644
--- a/shib-target/RPCListener.cpp
+++ b/shib-target/RPCListener.cpp
@@ -237,21 +237,21 @@ EntryWrapper::EntryWrapper(shibrpc_get_session_ret_2& ret, Category& log)
 
     istringstream authstream(ret.auth_statement);
     log.debugStream() << "trying to decode authentication statement: "
-        << ((ret.auth_statement && *ret.auth_statement) ? ret.auth_statement : "(none)") << CategoryStream::ENDLINE;
+        << ((ret.auth_statement && *ret.auth_statement) ? ret.auth_statement : "(none)") << logging::eol;
     auto_ptr<SAMLAuthenticationStatement> s(
     	(ret.auth_statement && *ret.auth_statement) ? new SAMLAuthenticationStatement(authstream) : NULL
     	);
 
     istringstream prestream(ret.attr_response_pre);
     log.debugStream() << "trying to decode unfiltered attribute response: "
-        << ((ret.attr_response_pre && *ret.attr_response_pre) ? ret.attr_response_pre : "(none)") << CategoryStream::ENDLINE;
+        << ((ret.attr_response_pre && *ret.attr_response_pre) ? ret.attr_response_pre : "(none)") << logging::eol;
     auto_ptr<SAMLResponse> pre(
     	(ret.attr_response_pre && *ret.attr_response_pre) ? new SAMLResponse(prestream,minor) : NULL
     	);
 
     istringstream poststream(ret.attr_response_post);
     log.debugStream() << "trying to decode filtered attribute response: "
-        << ((ret.attr_response_post && *ret.attr_response_post) ? ret.attr_response_post : "(none)") << CategoryStream::ENDLINE;
+        << ((ret.attr_response_post && *ret.attr_response_post) ? ret.attr_response_post : "(none)") << logging::eol;
     auto_ptr<SAMLResponse> post(
     	(ret.attr_response_post && *ret.attr_response_post) ? new SAMLResponse(poststream,minor) : NULL
     	);
diff --git a/shib-target/XMLRequestMapper.cpp b/shib-target/XMLRequestMapper.cpp
index 069641e..2c0e8dc 100644
--- a/shib-target/XMLRequestMapper.cpp
+++ b/shib-target/XMLRequestMapper.cpp
@@ -528,7 +528,7 @@ void XMLRequestMapperImpl::init()
         }
     }
     catch (SAMLException& e) {
-        log->errorStream() << "Error while parsing request mapping configuration: " << e.what() << CategoryStream::ENDLINE;
+        log->errorStream() << "Error while parsing request mapping configuration: " << e.what() << logging::eol;
         throw;
     }
 #ifndef _DEBUG
diff --git a/shib-target/shib-ini.cpp b/shib-target/shib-ini.cpp
index 3ded944..3d719de 100644
--- a/shib-target/shib-ini.cpp
+++ b/shib-target/shib-ini.cpp
@@ -580,7 +580,7 @@ XMLApplication::XMLApplication(
         }
     }
     catch (SAMLException& e) {
-        log.errorStream() << "Error while processing applicaton element: " << e.what() << CategoryStream::ENDLINE;
+        log.errorStream() << "Error while processing applicaton element: " << e.what() << logging::eol;
         cleanup();
         throw;
     }
@@ -1150,7 +1150,7 @@ void XMLConfigImpl::init(bool first)
         }
     }
     catch (SAMLException& e) {
-        log.errorStream() << "Error while loading SP configuration: " << e.what() << CategoryStream::ENDLINE;
+        log.errorStream() << "Error while loading SP configuration: " << e.what() << logging::eol;
         throw;
     }
 #ifndef _DEBUG
diff --git a/shib/ReloadableXMLFile.cpp b/shib/ReloadableXMLFile.cpp
index adafef4..0db0d53 100644
--- a/shib/ReloadableXMLFile.cpp
+++ b/shib/ReloadableXMLFile.cpp
@@ -53,12 +53,12 @@ ReloadableXMLFileImpl::ReloadableXMLFileImpl(const char* pathname) : m_doc(NULL)
         m_doc=p.parse(dsrc);
         m_root=m_doc->getDocumentElement();
 
-        log.infoStream() << "Loaded and parsed XML file (" << pathname << ")" << CategoryStream::ENDLINE;
+        log.infoStream() << "Loaded and parsed XML file (" << pathname << ")" << logging::eol;
     }
     catch (XMLException& e)
     {
         auto_ptr_char msg(e.getMessage());
-        log.errorStream() << "Xerces error while opening configuration file (" << pathname << "): " << msg.get() << CategoryStream::ENDLINE;
+        log.errorStream() << "Xerces error while opening configuration file (" << pathname << "): " << msg.get() << logging::eol;
         if (m_doc) {
             m_doc->release();
             m_doc=NULL;
@@ -67,7 +67,7 @@ ReloadableXMLFileImpl::ReloadableXMLFileImpl(const char* pathname) : m_doc(NULL)
     }
     catch (SAMLException& e)
     {
-        log.errorStream() << "XML error while parsing configuration file (" << pathname << "): " << e.what() << CategoryStream::ENDLINE;
+        log.errorStream() << "XML error while parsing configuration file (" << pathname << "): " << e.what() << logging::eol;
         if (m_doc) {
             m_doc->release();
             m_doc=NULL;
@@ -77,7 +77,7 @@ ReloadableXMLFileImpl::ReloadableXMLFileImpl(const char* pathname) : m_doc(NULL)
 #ifndef _DEBUG
     catch (...)
     {
-        log.errorStream() << "Unexpected error while parsing configuration file (" << pathname << ")" << CategoryStream::ENDLINE;
+        log.errorStream() << "Unexpected error while parsing configuration file (" << pathname << ")" << logging::eol;
         if (m_doc) {
             m_doc->release();
             m_doc=NULL;
diff --git a/shib/ShibbolethTrust.cpp b/shib/ShibbolethTrust.cpp
index ba24e04..c6bb916 100644
--- a/shib/ShibbolethTrust.cpp
+++ b/shib/ShibbolethTrust.cpp
@@ -45,9 +45,9 @@ namespace {
         unsigned long code=ERR_get_error_line_data(&file,&line,&data,&flags);
         while (code) {
             Category& log=Category::getInstance("OpenSSL");
-            log.errorStream() << "error code: " << code << " in " << file << ", line " << line << CategoryStream::ENDLINE;
+            log.errorStream() << "error code: " << code << " in " << file << ", line " << line << logging::eol;
             if (data && (flags & ERR_TXT_STRING))
-                log.errorStream() << "error data: " << data << CategoryStream::ENDLINE;
+                log.errorStream() << "error data: " << data << logging::eol;
             code=ERR_get_error_line_data(&file,&line,&data,&flags);
         }
     }
@@ -312,7 +312,7 @@ bool ShibbolethTrust::validate(void* certEE, const Iterator<void*>& certChain, c
                 buf[len] = '\0';
                 subjectstr+=buf;
             }
-            log.infoStream() << "certificate subject: " << subjectstr << CategoryStream::ENDLINE;
+            log.infoStream() << "certificate subject: " << subjectstr << logging::eol;
             // The flags give us LDAP order instead of X.500, with a comma plus space separator.
             len=X509_NAME_print_ex(b2,subject,0,XN_FLAG_RFC2253 + XN_FLAG_SEP_CPLUS_SPC - XN_FLAG_SEP_COMMA_PLUS);
             BIO_flush(b2);
diff --git a/siterefresh/siterefresh.cpp b/siterefresh/siterefresh.cpp
index ec229dc..9b3a840 100644
--- a/siterefresh/siterefresh.cpp
+++ b/siterefresh/siterefresh.cpp
@@ -289,25 +289,25 @@ int main(int argc,char* argv[])
         ret=-1;
     }
     catch(SAMLException& e) {
-        log.errorStream() << "caught a SAML exception: " << e.what() << CategoryStream::ENDLINE;
+        log.errorStream() << "caught a SAML exception: " << e.what() << siterefresh::logging::eol;
         ret=-2;
     }
     catch(XMLException& e) {
         auto_ptr_char temp(e.getMessage());
-        log.errorStream() << "caught an XML exception: " << temp.get() << CategoryStream::ENDLINE;
+        log.errorStream() << "caught an XML exception: " << temp.get() << siterefresh::logging::eol;
         ret=-3;
     }
     catch(XSECException& e) {
         auto_ptr_char temp(e.getMsg());
-        log.errorStream() << "caught an XMLSec exception: " << temp.get() << CategoryStream::ENDLINE;
+        log.errorStream() << "caught an XMLSec exception: " << temp.get() << siterefresh::logging::eol;
         ret=-4;
     }
     catch(XSECCryptoException& e) {
-        log.errorStream() << "caught an XMLSecCrypto exception: " << e.getMsg() << CategoryStream::ENDLINE;
+        log.errorStream() << "caught an XMLSecCrypto exception: " << e.getMsg() << siterefresh::logging::eol;
         ret=-5;
     }
     catch(...) {
-        log.errorStream() << "caught an unknown exception" << CategoryStream::ENDLINE;
+        log.errorStream() << "caught an unknown exception" << siterefresh::logging::eol;
         ret=-6;
     }
 
diff --git a/xmlproviders/XMLAAP.cpp b/xmlproviders/XMLAAP.cpp
index 6735e61..8ce7226 100644
--- a/xmlproviders/XMLAAP.cpp
+++ b/xmlproviders/XMLAAP.cpp
@@ -197,7 +197,7 @@ void XMLAAPImpl::init()
     }
     catch (SAMLException& e)
     {
-        log.errorStream() << "Error while parsing AAP: " << e.what() << CategoryStream::ENDLINE;
+        log.errorStream() << "Error while parsing AAP: " << e.what() << xmlproviders::logging::eol;
         this->~XMLAAPImpl();
         throw;
     }
@@ -395,7 +395,7 @@ namespace {
         {
             auto_ptr<char> tmp(XMLString::transcode(ex.getMessage()));
             Category::getInstance(XMLPROVIDERS_LOGCAT".XMLAAPImpl").errorStream()
-                << "caught exception while parsing regular expression: " << tmp.get() << CategoryStream::ENDLINE;
+                << "caught exception while parsing regular expression: " << tmp.get() << xmlproviders::logging::eol;
         }
         return false;
     }
diff --git a/xmlproviders/XMLAccessControl.cpp b/xmlproviders/XMLAccessControl.cpp
index 08c7a59..97a7ae7 100644
--- a/xmlproviders/XMLAccessControl.cpp
+++ b/xmlproviders/XMLAccessControl.cpp
@@ -264,7 +264,7 @@ void XMLAccessControlImpl::init()
             m_rootAuthz=new Operator(rootElement);
     }
     catch (SAMLException& e) {
-        log->errorStream() << "Error while parsing access control configuration: " << e.what() << CategoryStream::ENDLINE;
+        log->errorStream() << "Error while parsing access control configuration: " << e.what() << xmlproviders::logging::eol;
         throw;
     }
 #ifndef _DEBUG
diff --git a/xmlproviders/XMLCredentials.cpp b/xmlproviders/XMLCredentials.cpp
index 57f00f9..8d67052 100644
--- a/xmlproviders/XMLCredentials.cpp
+++ b/xmlproviders/XMLCredentials.cpp
@@ -128,7 +128,7 @@ void XMLCredentialsImpl::init()
         }
     }
     catch (SAMLException& e) {
-        log.errorStream() << "Error while parsing creds configuration: " << e.what() << CategoryStream::ENDLINE;
+        log.errorStream() << "Error while parsing creds configuration: " << e.what() << xmlproviders::logging::eol;
         for (resolvermap_t::iterator j=m_resolverMap.begin(); j!=m_resolverMap.end(); j++)
             delete j->second;
         throw;
diff --git a/xmlproviders/XMLMetadata.cpp b/xmlproviders/XMLMetadata.cpp
index d6d59b8..ddbc7af 100644
--- a/xmlproviders/XMLMetadata.cpp
+++ b/xmlproviders/XMLMetadata.cpp
@@ -1194,7 +1194,7 @@ void XMLMetadataImpl::init()
     }
     catch (SAMLException& e)
     {
-        log.errorStream() << "Error while parsing SAML metadata: " << e.what() << CategoryStream::ENDLINE;
+        log.errorStream() << "Error while parsing SAML metadata: " << e.what() << xmlproviders::logging::eol;
         this->~XMLMetadataImpl();
         throw;
     }
@@ -1366,13 +1366,13 @@ bool XMLMetadata::verifySignature(DOMDocument* doc, const DOMElement* parent, bo
     }
     catch(XSECException& e) {
         auto_ptr_char msg(e.getMsg());
-        log.errorStream() << "caught XMLSec exception while verifying metadata signature: " << msg.get() << CategoryStream::ENDLINE;
+        log.errorStream() << "caught XMLSec exception while verifying metadata signature: " << msg.get() << xmlproviders::logging::eol;
         if (sig)
             prov.releaseSignature(sig);
         return false;
     }
     catch(XSECCryptoException& e) {
-        log.errorStream() << "caught XMLSecCrypto exception while verifying metadata signature: " << e.getMsg() << CategoryStream::ENDLINE;
+        log.errorStream() << "caught XMLSecCrypto exception while verifying metadata signature: " << e.getMsg() << xmlproviders::logging::eol;
         if (sig)
             prov.releaseSignature(sig);
         return false;
diff --git a/xmlproviders/XMLProviders.cpp b/xmlproviders/XMLProviders.cpp
index 4565b7b..535109e 100644
--- a/xmlproviders/XMLProviders.cpp
+++ b/xmlproviders/XMLProviders.cpp
@@ -99,9 +99,9 @@ void log_openssl()
     unsigned long code=ERR_get_error_line_data(&file,&line,&data,&flags);
     while (code) {
         Category& log=Category::getInstance("OpenSSL");
-        log.errorStream() << "error code: " << code << " in " << file << ", line " << line << CategoryStream::ENDLINE;
+        log.errorStream() << "error code: " << code << " in " << file << ", line " << line << xmlproviders::logging::eol;
         if (data && (flags & ERR_TXT_STRING))
-            log.errorStream() << "error data: " << data << CategoryStream::ENDLINE;
+            log.errorStream() << "error data: " << data << xmlproviders::logging::eol;
         code=ERR_get_error_line_data(&file,&line,&data,&flags);
     }
 }
diff --git a/xmlproviders/XMLTrust.cpp b/xmlproviders/XMLTrust.cpp
index 5dfa234..6e6a04e 100644
--- a/xmlproviders/XMLTrust.cpp
+++ b/xmlproviders/XMLTrust.cpp
@@ -329,7 +329,7 @@ void XMLTrustImpl::init()
         walker->release();    // This just cleans up aggressively, but there's no leak if we don't.
     }
     catch (SAMLException& e) {
-        log.errorStream() << "Error while parsing trust configuration: " << e.what() << CategoryStream::ENDLINE;
+        log.errorStream() << "Error while parsing trust configuration: " << e.what() << xmlproviders::logging::eol;
         this->~XMLTrustImpl();
         throw;
     }
@@ -470,7 +470,7 @@ bool XMLTrust::validate(void* certEE, const Iterator<void*>& certChain, const IR
                 buf[len] = '\0';
                 subjectstr+=buf;
             }
-            log.infoStream() << "certificate subject: " << subjectstr << CategoryStream::ENDLINE;
+            log.infoStream() << "certificate subject: " << subjectstr << xmlproviders::logging::eol;
             // The flags give us LDAP order instead of X.500, with a comma plus space separator.
             len=X509_NAME_print_ex(b2,subject,0,XN_FLAG_RFC2253 + XN_FLAG_SEP_CPLUS_SPC - XN_FLAG_SEP_COMMA_PLUS);
             BIO_flush(b2);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-shibboleth/shibboleth-sp2.git



More information about the Pkg-shibboleth-devel mailing list