rpms/tog-pegasus/devel pegasus-2.5.1-HOSTNAME_MAX.patch, NONE, 1.1 pegasus-2.5.1-PATH_MAX.patch, NONE, 1.1 pegasus-2.5.1-obz4945.patch, NONE, 1.1 tog-pegasus.spec, 1.28, 1.29
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Fri Apr 14 23:35:43 UTC 2006
Author: jvdias
Update of /cvs/dist/rpms/tog-pegasus/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv12564
Modified Files:
tog-pegasus.spec
Added Files:
pegasus-2.5.1-HOSTNAME_MAX.patch pegasus-2.5.1-PATH_MAX.patch
pegasus-2.5.1-obz4945.patch
Log Message:
fix upstream bugzillas 4934(4943) and 4945; fix PATH_MAX and MAXHOSTNAMELEN issues;
pegasus-2.5.1-HOSTNAME_MAX.patch:
Platform_LINUX_IA64_GNU.h | 7 +++++--
Platform_LINUX_IX86_GNU.h | 7 +++++--
Platform_LINUX_PPC64_GNU.h | 7 +++++--
Platform_LINUX_PPC_GNU.h | 7 +++++--
Platform_LINUX_X86_64_GNU.h | 7 +++++--
Platform_LINUX_XSCALE_GNU.h | 7 +++++--
Platform_LINUX_ZSERIES64_GNU.h | 8 ++++++--
Platform_LINUX_ZSERIES_GNU.h | 7 +++++--
8 files changed, 41 insertions(+), 16 deletions(-)
--- NEW FILE pegasus-2.5.1-HOSTNAME_MAX.patch ---
--- 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 <stdio.h>
#include <stdlib.h>
#include <sys/param.h> // For MAXHOSTNAMELEN
+#include <limits.h>
-#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 <stdio.h>
#include <stdlib.h>
#include <sys/param.h> // For MAXHOSTNAMELEN
+#include <limits.h>
-#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 <stdio.h>
#include <stdlib.h>
#include <sys/param.h> // For MAXHOSTNAMELEN
+#include <limits.h>
-#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 <stdio.h>
#include <stdlib.h>
#include <sys/param.h> // For MAXHOSTNAMELEN
+#include <limits.h>
-#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 <stdio.h>
#include <stdlib.h>
#include <sys/param.h> // For MAXHOSTNAMELEN
+#include <limits.h>
-#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 <stdio.h>
#include <stdlib.h>
#include <sys/param.h> // For MAXHOSTNAMELEN
+#include <limits.h>
-#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 <stdlib.h>
#include <sys/param.h> // For MAXHOSTNAMELEN
-#if defined(PEGASUS_OS_LSB) && !defined(MAXHOSTNAMELEN)
-#define PEGASUS_MAXHOSTNAMELEN 64
+#include <limits.h>
+
+#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 <stdio.h>
#include <stdlib.h>
#include <sys/param.h> // For MAXHOSTNAMELEN
+#include <limits.h>
-#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-2.5.1-PATH_MAX.patch:
System.cpp | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
--- NEW FILE pegasus-2.5.1-PATH_MAX.patch ---
--- 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 == '/')
pegasus-2.5.1-obz4945.patch:
ControlProviders/CertificateProvider/CertificateProvider.cpp | 69 ++++++++++-
msg/Server/pegasusServer_en.txt | 5
2 files changed, 67 insertions(+), 7 deletions(-)
--- NEW FILE pegasus-2.5.1-obz4945.patch ---
--- 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,
Index: tog-pegasus.spec
===================================================================
RCS file: /cvs/dist/rpms/tog-pegasus/devel/tog-pegasus.spec,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- tog-pegasus.spec 11 Apr 2006 19:46:17 -0000 1.28
+++ tog-pegasus.spec 14 Apr 2006 23:35:38 -0000 1.29
@@ -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 @@
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 @@
%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 @@
:;
%changelog
+* Fri Apr 14 2006 Jason Vas Dias <jvdias at redhat.com> - 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 <jvdias at redhat.com> - 2:2.5.1-1
- Upgrade to version 2.5.1 (including new upstream .spec file).
More information about the fedora-cvs-commits
mailing list