diff --git a/pegasus-2.5.1-HOSTNAME_MAX.patch b/pegasus-2.5.1-HOSTNAME_MAX.patch new file mode 100644 index 0000000..d46e991 --- /dev/null +++ b/pegasus-2.5.1-HOSTNAME_MAX.patch @@ -0,0 +1,136 @@ +--- pegasus/src/Pegasus/Common/Platform_LINUX_XSCALE_GNU.h.HOSTNAME_MAX 2006-01-30 11:17:07.000000000 -0500 ++++ pegasus/src/Pegasus/Common/Platform_LINUX_XSCALE_GNU.h 2006-04-14 18:41:28.000000000 -0400 +@@ -72,9 +72,12 @@ + #include + #include + #include // For MAXHOSTNAMELEN ++#include + +-#if defined(PEGASUS_OS_LSB) && !defined(MAXHOSTNAMELEN) +-#define PEGASUS_MAXHOSTNAMELEN 64 ++#ifdef _POSIX_HOST_NAME_MAX ++#define PEGASUS_MAXHOSTNAMELEN (_POSIX_HOST_NAME_MAX) ++#else ++#define PEGASUS_MAXHOSTNAMELEN 255 + #endif + + #define PEGASUS_SOCKLEN_T socklen_t +--- pegasus/src/Pegasus/Common/Platform_LINUX_IA64_GNU.h.HOSTNAME_MAX 2006-01-30 11:17:07.000000000 -0500 ++++ pegasus/src/Pegasus/Common/Platform_LINUX_IA64_GNU.h 2006-04-14 18:37:02.000000000 -0400 +@@ -69,9 +69,12 @@ + #include + #include + #include // For MAXHOSTNAMELEN ++#include + +-#if defined(PEGASUS_OS_LSB) && !defined(MAXHOSTNAMELEN) +-#define PEGASUS_MAXHOSTNAMELEN 64 ++#ifdef _POSIX_HOST_NAME_MAX ++#define PEGASUS_MAXHOSTNAMELEN (_POSIX_HOST_NAME_MAX) ++#else ++#define PEGASUS_MAXHOSTNAMELEN 255 + #endif + + #define PEGASUS_SOCKLEN_T socklen_t +--- pegasus/src/Pegasus/Common/Platform_LINUX_ZSERIES_GNU.h.HOSTNAME_MAX 2006-01-30 11:17:07.000000000 -0500 ++++ pegasus/src/Pegasus/Common/Platform_LINUX_ZSERIES_GNU.h 2006-04-14 18:40:02.000000000 -0400 +@@ -69,9 +69,12 @@ + #include + #include + #include // For MAXHOSTNAMELEN ++#include + +-#if defined(PEGASUS_OS_LSB) && !defined(MAXHOSTNAMELEN) +-#define PEGASUS_MAXHOSTNAMELEN 64 ++#ifdef _POSIX_HOST_NAME_MAX ++#define PEGASUS_MAXHOSTNAMELEN (_POSIX_HOST_NAME_MAX) ++#else ++#define PEGASUS_MAXHOSTNAMELEN 255 + #endif + + #define PEGASUS_SOCKLEN_T socklen_t +--- pegasus/src/Pegasus/Common/Platform_LINUX_X86_64_GNU.h.HOSTNAME_MAX 2006-01-30 11:17:07.000000000 -0500 ++++ pegasus/src/Pegasus/Common/Platform_LINUX_X86_64_GNU.h 2006-04-14 18:38:18.000000000 -0400 +@@ -73,9 +73,12 @@ + #include + #include + #include // For MAXHOSTNAMELEN ++#include + +-#if defined(PEGASUS_OS_LSB) && !defined(MAXHOSTNAMELEN) +-#define PEGASUS_MAXHOSTNAMELEN 64 ++#ifdef _POSIX_HOST_NAME_MAX ++#define PEGASUS_MAXHOSTNAMELEN (_POSIX_HOST_NAME_MAX) ++#else ++#define PEGASUS_MAXHOSTNAMELEN 255 + #endif + + #define PEGASUS_SOCKLEN_T socklen_t +--- pegasus/src/Pegasus/Common/Platform_LINUX_PPC_GNU.h.HOSTNAME_MAX 2006-01-30 11:17:07.000000000 -0500 ++++ pegasus/src/Pegasus/Common/Platform_LINUX_PPC_GNU.h 2006-04-14 18:38:50.000000000 -0400 +@@ -73,9 +73,12 @@ + #include + #include + #include // For MAXHOSTNAMELEN ++#include + +-#if defined(PEGASUS_OS_LSB) && !defined(MAXHOSTNAMELEN) +-#define PEGASUS_MAXHOSTNAMELEN 64 ++#ifdef _POSIX_HOST_NAME_MAX ++#define PEGASUS_MAXHOSTNAMELEN (_POSIX_HOST_NAME_MAX) ++#else ++#define PEGASUS_MAXHOSTNAMELEN 255 + #endif + + #define PEGASUS_SOCKLEN_T socklen_t +--- pegasus/src/Pegasus/Common/Platform_LINUX_IX86_GNU.h.HOSTNAME_MAX 2006-01-30 11:17:07.000000000 -0500 ++++ pegasus/src/Pegasus/Common/Platform_LINUX_IX86_GNU.h 2006-04-14 18:37:23.000000000 -0400 +@@ -74,9 +74,12 @@ + #include + #include + #include // For MAXHOSTNAMELEN ++#include + +-#if defined(PEGASUS_OS_LSB) && !defined(MAXHOSTNAMELEN) +-#define PEGASUS_MAXHOSTNAMELEN 64 ++#ifdef _POSIX_HOST_NAME_MAX ++#define PEGASUS_MAXHOSTNAMELEN (_POSIX_HOST_NAME_MAX) ++#else ++#define PEGASUS_MAXHOSTNAMELEN 255 + #endif + + #define PEGASUS_SOCKLEN_T socklen_t +--- pegasus/src/Pegasus/Common/Platform_LINUX_ZSERIES64_GNU.h.HOSTNAME_MAX 2006-01-30 11:17:07.000000000 -0500 ++++ pegasus/src/Pegasus/Common/Platform_LINUX_ZSERIES64_GNU.h 2006-04-14 18:40:30.000000000 -0400 +@@ -70,8 +70,12 @@ + #include + #include // For MAXHOSTNAMELEN + +-#if defined(PEGASUS_OS_LSB) && !defined(MAXHOSTNAMELEN) +-#define PEGASUS_MAXHOSTNAMELEN 64 ++#include ++ ++#ifdef _POSIX_HOST_NAME_MAX ++#define PEGASUS_MAXHOSTNAMELEN (_POSIX_HOST_NAME_MAX) ++#else ++#define PEGASUS_MAXHOSTNAMELEN 255 + #endif + + #define PEGASUS_SOCKLEN_T socklen_t +--- pegasus/src/Pegasus/Common/Platform_LINUX_PPC64_GNU.h.HOSTNAME_MAX 2006-01-30 11:17:07.000000000 -0500 ++++ pegasus/src/Pegasus/Common/Platform_LINUX_PPC64_GNU.h 2006-04-14 18:39:13.000000000 -0400 +@@ -73,9 +73,12 @@ + #include + #include + #include // For MAXHOSTNAMELEN ++#include + +-#if defined(PEGASUS_OS_LSB) && !defined(MAXHOSTNAMELEN) +-#define PEGASUS_MAXHOSTNAMELEN 64 ++#ifdef _POSIX_HOST_NAME_MAX ++#define PEGASUS_MAXHOSTNAMELEN (_POSIX_HOST_NAME_MAX) ++#else ++#define PEGASUS_MAXHOSTNAMELEN 255 + #endif + + #define PEGASUS_SOCKLEN_T socklen_t diff --git a/pegasus-2.5.1-PATH_MAX.patch b/pegasus-2.5.1-PATH_MAX.patch new file mode 100644 index 0000000..f578a5f --- /dev/null +++ b/pegasus-2.5.1-PATH_MAX.patch @@ -0,0 +1,18 @@ +--- pegasus/src/Pegasus/Common/System.cpp.PATH_MAX 2006-01-30 11:17:08.000000000 -0500 ++++ pegasus/src/Pegasus/Common/System.cpp 2006-04-14 18:19:27.000000000 -0400 +@@ -185,13 +185,13 @@ + char *System::extract_file_path(const char *fullpath, char *dirname) + { + char *p; +- char buff[2048]; ++ char buff[PATH_MAX]; + if (fullpath == NULL) + { + dirname[0] = '\0'; + return dirname; + } +- strcpy(buff, fullpath); ++ strncpy(buff, fullpath, PATH_MAX); + for(p = buff + strlen(buff); p >= buff; p--) + { + if (*p == '\\' || *p == '/') diff --git a/pegasus-2.5.1-obz4934.patch b/pegasus-2.5.1-obz4934.patch new file mode 100644 index 0000000..9db2c98 --- /dev/null +++ b/pegasus-2.5.1-obz4934.patch @@ -0,0 +1,56 @@ +--- pegasus/src/Pegasus/ProviderManager2/ProviderManagerService.cpp.obz4934 2006-02-28 14:53:30.000000000 -0500 ++++ pegasus/src/Pegasus/ProviderManager2/ProviderManagerService.cpp 2006-04-14 17:47:30.000000000 -0400 +@@ -567,8 +567,8 @@ + CIMRequestMessage* request, + CIMResponseMessage* response) + { +- CIMStatusCode code = CIM_ERR_SUCCESS; +- String message; ++ PEG_METHOD_ENTER(TRC_PROVIDERMANAGER, ++ "ProviderManagerService::responseChunkCallback"); + + try + { +@@ -601,25 +601,20 @@ + + op->_async_callback(op, service, op->_callback_ptr); + } +- +- catch(CIMException &e) +- { +- code = e.getCode(); +- message = e.getMessage(); +- } + catch(Exception &e) + { +- code = CIM_ERR_FAILED; +- message = e.getMessage(); ++ PEG_TRACE_STRING(TRC_DISCARDED_DATA, Tracer::LEVEL2, ++ "Exception in ProviderManagerService::responseChunkCallback: " + ++ e.getMessage() + ". Chunk not delivered."); + } + catch(...) + { +- code = CIM_ERR_FAILED; +- message = cimStatusCodeToString(code); ++ PEG_TRACE_STRING(TRC_DISCARDED_DATA, Tracer::LEVEL2, ++ "Exception in ProviderManagerService::responseChunkCallback. " ++ "Chunk not delivered."); + } + +- if (code != CIM_ERR_SUCCESS) +- response->cimException = PEGASUS_CIM_EXCEPTION(code, message); ++ PEG_METHOD_EXIT(); + } + + Message* ProviderManagerService::_processMessage(CIMRequestMessage* request) +--- pegasus/src/Pegasus/Server/CIMOperationRequestDispatcher.cpp.obz4934 2006-03-14 17:12:21.000000000 -0500 ++++ pegasus/src/Pegasus/Server/CIMOperationRequestDispatcher.cpp 2006-04-14 17:24:06.000000000 -0400 +@@ -1770,6 +1770,7 @@ + { + // put back the async request because there are more chunks to come. + op->put_request(asyncRequest); ++ delete asyncReply; + } + else + { diff --git a/pegasus-2.5.1-obz4945.patch b/pegasus-2.5.1-obz4945.patch new file mode 100644 index 0000000..7d6e45e --- /dev/null +++ b/pegasus-2.5.1-obz4945.patch @@ -0,0 +1,102 @@ +--- pegasus/src/Pegasus/msg/Server/pegasusServer_en.txt.obz4945 2006-03-15 16:28:36.000000000 -0500 ++++ pegasus/src/Pegasus/msg/Server/pegasusServer_en.txt 2006-04-14 17:55:22.000000000 -0400 +@@ -1167,8 +1167,11 @@ + + ControlProviders.CertificateProvider.EMPTY_CRL:string {"PGS03312: The certificate revocation list is empty."} + +- ControlProviders.CertificateProvider.TRUSTSTORE_RELOAD_FAILED:string {"PGS03313: Trust store reload failed. Certificate deletion will not be effective until cimserver restart."} ++ ControlProviders.CertificateProvider.TRUSTSTORE_RELOAD_FAILED:string {"PGS03313: Trust store reload failed. Certificate deletion will not be effective until cimserver restart."} + ++ ControlProviders.CertificateProvider.ERROR_WRITING_CERT:string {"PGS03314: Unable to add certificate to truststore. Error while trying to write certificate."} ++ ++ ControlProviders.CertificateProvider.ERROR_WRITING_CRL:string {"PGS03315: Unable to add CRL to truststore. Error while trying to write CRL."} + + // ========================================================== + // Messages for CIMOMHandle +--- pegasus/src/Pegasus/ControlProviders/CertificateProvider/CertificateProvider.cpp.obz4945 2006-03-14 16:06:37.000000000 -0500 ++++ pegasus/src/Pegasus/ControlProviders/CertificateProvider/CertificateProvider.cpp 2006-04-14 17:55:21.000000000 -0400 +@@ -1384,10 +1384,38 @@ + sprintf(newFileName, "%s", (const char*) certificateFileName.getCString()); + + //use the ssl functions to write out the client x509 certificate +- //TODO: add some error checking here + BIO* outFile = BIO_new(BIO_s_file()); +- BIO_write_filename(outFile, newFileName); +- int i = PEM_write_bio_X509(outFile, xCert); ++ if (outFile == NULL) ++ { ++ PEG_TRACE_STRING(TRC_CONTROLPROVIDER, Tracer::LEVEL2, ++ "Unable to add certificate to truststore. " ++ "Error while trying to write certificate, BIO_new returned error"); ++ MessageLoaderParms parms("ControlProviders.CertificateProvider.ERROR_WRITING_CERT", ++ "Unable to add certificate to truststore. Error while trying to write certificate."); ++ throw CIMException(CIM_ERR_FAILED, parms); ++ } ++ ++ if (!BIO_write_filename(outFile, newFileName)) ++ { ++ BIO_free_all(outFile); ++ PEG_TRACE_STRING(TRC_CONTROLPROVIDER, Tracer::LEVEL2, ++ "Unable to add certificate to truststore. Error while trying to write certificate, " ++ "BIO_write_filename returned error"); ++ MessageLoaderParms parms("ControlProviders.CertificateProvider.ERROR_WRITING_CERT", ++ "Unable to add certificate to truststore. Error while trying to write certificate."); ++ throw CIMException(CIM_ERR_FAILED, parms); ++ } ++ if (!PEM_write_bio_X509(outFile, xCert)) ++ { ++ BIO_free_all(outFile); ++ PEG_TRACE_STRING(TRC_CONTROLPROVIDER, Tracer::LEVEL2, ++ "Unable to add certificate to truststore. " ++ "Error while trying to write certificate, PEM_write_bio_X509 returned error"); ++ MessageLoaderParms parms("ControlProviders.CertificateProvider.ERROR_WRITING_CERT", ++ "Unable to add certificate to truststore. Error while trying to write certificate."); ++ throw CIMException(CIM_ERR_FAILED, parms); ++ } ++ + BIO_free_all(outFile); + + if (userName == String::EMPTY) +@@ -1528,10 +1556,39 @@ + sprintf(newFileName, "%s", (const char*) crlFileName.getCString()); + + //use the ssl functions to write out the client x509 certificate +- //TODO: add some error checking here + BIO* outFile = BIO_new(BIO_s_file()); +- BIO_write_filename(outFile, newFileName); +- int i = PEM_write_bio_X509_CRL(outFile, xCrl); ++ if (outFile == NULL) ++ { ++ PEG_TRACE_STRING(TRC_CONTROLPROVIDER, Tracer::LEVEL2, ++ "Unable to add CRL to truststore. " ++ "Error while trying to write CRL, BIO_new returned error"); ++ MessageLoaderParms parms("ControlProviders.CertificateProvider.ERROR_WRITING_CRL", ++ "Unable to add CRL to truststore. Error while trying to write CRL."); ++ throw CIMException(CIM_ERR_FAILED, parms); ++ } ++ ++ if (!BIO_write_filename(outFile, newFileName)) ++ { ++ BIO_free_all(outFile); ++ PEG_TRACE_STRING(TRC_CONTROLPROVIDER, Tracer::LEVEL2, ++ "Unable to add CRL to truststore. " ++ "Error while trying to write CRL, BIO_write_filename returned error"); ++ MessageLoaderParms parms("ControlProviders.CertificateProvider.ERROR_WRITING_CRL", ++ "Unable to add CRL to truststore. Error while trying to write CRL."); ++ throw CIMException(CIM_ERR_FAILED, parms); ++ } ++ ++ if (!PEM_write_bio_X509_CRL(outFile, xCrl)) ++ { ++ BIO_free_all(outFile); ++ PEG_TRACE_STRING(TRC_CONTROLPROVIDER, Tracer::LEVEL2, ++ "Unable to add CRL to truststore. " ++ "Error while trying to write CRL, PEM_write_bio_X509_CRL returned error"); ++ MessageLoaderParms parms("ControlProviders.CertificateProvider.ERROR_WRITING_CRL", ++ "Unable to add CRL to truststore. Error while trying to write CRL."); ++ throw CIMException(CIM_ERR_FAILED, parms); ++ } ++ + BIO_free_all(outFile); + + Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE, diff --git a/tog-pegasus.spec b/tog-pegasus.spec index cc5ee36..2a3f64a 100644 --- a/tog-pegasus.spec +++ b/tog-pegasus.spec @@ -31,7 +31,7 @@ %define pegasus_uid 66 Version: 2.5.1 -Release: 1%{?LINUX_VERSION:.%{LINUX_VERSION}} +Release: 2%{?LINUX_VERSION:.%{LINUX_VERSION}} Epoch: 2 # Summary: OpenPegasus WBEM Services for Linux @@ -61,6 +61,10 @@ Patch9: pegasus-2.5.1-parallel_make.patch Patch10: pegasus-2.5.1-fix_zseries_flags.patch Patch11: pegasus-2.5.1-fix_tests.patch Patch12: pegasus-2.5.1-AutoPtr-Core.patch +Patch13: pegasus-2.5.1-obz4934.patch +Patch14: pegasus-2.5.1-obz4945.patch +Patch15: pegasus-2.5.1-PATH_MAX.patch +Patch16: pegasus-2.5.1-HOSTNAME_MAX.patch # Conflicts: openwbem Provides: tog-pegasus-cimserver @@ -128,6 +132,10 @@ The OpenPegasus WBEM tests for the OpenPegasus %{version} Linux rpm. %patch10 -p1 -b .fix-zseries-flags %patch11 -p1 -b .fix-tests %patch12 -p1 -b .AutoPtr-Core +%patch13 -p1 -b .obz4934 +%patch14 -p1 -b .obz4945 +%patch15 -p1 -b .PATH_MAX +%patch16 -p1 -b .HOSTNAME_MAX %build rm -rf ${RPM_BUILD_ROOT} || :; @@ -263,6 +271,12 @@ fi :; %changelog +* Fri Apr 14 2006 Jason Vas Dias - 2:2.5.1-2 +- Apply patches for the two '2.5.2_APPROVED' upstream bugzillas + 4934(4943) and 4945 : + (http://cvs.opengroup.org/bugzilla/buglist.cgi?bug_id=4943%2C4945) +- Fix the PATH_MAX and MAXHOSTNAMELEN issues (again) + * Thu Apr 06 2006 Jason Vas Dias - 2:2.5.1-1 - Upgrade to version 2.5.1 (including new upstream .spec file).