import sblim-wbemcli-1.6.3-22.el9

c9 imports/c9/sblim-wbemcli-1.6.3-22.el9
CentOS Sources 2 years ago committed by MSVSphere Packaging Team
commit e9712db7c7

1
.gitignore vendored

@ -0,0 +1 @@
SOURCES/sblim-wbemcli-1.6.3.tar.bz2

@ -0,0 +1 @@
3ad04cb8e1a301ab514f059cf92f0a1f45e00d6b SOURCES/sblim-wbemcli-1.6.3.tar.bz2

@ -0,0 +1,12 @@
diff -up sblim-wbemcli-1.5.1/CimXml.h.BAD sblim-wbemcli-1.5.1/CimXml.h
--- sblim-wbemcli-1.5.1/CimXml.h.BAD 2008-06-20 10:10:54.000000000 -0500
+++ sblim-wbemcli-1.5.1/CimXml.h 2008-06-20 10:11:07.000000000 -0500
@@ -26,7 +26,7 @@
#include <cstdio>
#include <cstdlib>
-#include <string>
+#include <cstring>
#include <vector>
#include <iostream>

@ -0,0 +1,59 @@
diff -up sblim-wbemcli-1.6.1/CimCurl.cpp.orig sblim-wbemcli-1.6.1/CimCurl.cpp
--- sblim-wbemcli-1.6.1/CimCurl.cpp.orig 2009-03-04 20:10:54.000000000 +0100
+++ sblim-wbemcli-1.6.1/CimCurl.cpp 2015-08-10 13:59:47.312019828 +0200
@@ -165,8 +165,36 @@ void CimomCurl::genRequest(URL &url, con
rv = curl_easy_setopt(mHandle, CURLOPT_SSL_VERIFYHOST, 0);
// rv = curl_easy_setopt(mHandle, CURLOPT_SSL_VERIFYPEER, 0);
- /* Force using SSL V3 */
- rv = curl_easy_setopt(mHandle, CURLOPT_SSLVERSION, 3);
+ /* Force use of a specific SSL/TLS version */
+ char * curlSslVer = getenv("WBEMCLI_CURL_SSLVERSION");
+ if (curlSslVer) {
+ if (!strcasecmp(curlSslVer,"SSLv2"))
+ rv = curl_easy_setopt(mHandle, CURLOPT_SSLVERSION, CURL_SSLVERSION_SSLv2);
+ else if (!strcasecmp(curlSslVer,"SSLv3"))
+ rv = curl_easy_setopt(mHandle, CURLOPT_SSLVERSION, CURL_SSLVERSION_SSLv3);
+ else if (!strcasecmp(curlSslVer,"TLSv1"))
+ rv = curl_easy_setopt(mHandle, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1);
+ else if (!strcasecmp(curlSslVer,"TLSv1.0") || !strcasecmp(curlSslVer,"TLSv1_0"))
+#if LIBCURL_VERSION_NUM >= 0x072200
+ rv = curl_easy_setopt(mHandle, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_0);
+#else
+ throw URLException("WBEMCLI_CURL_SSLVERSION=TLSv1.0 requires libcurl 7.34 or greater");
+#endif
+ else if (!strcasecmp(curlSslVer,"TLSv1.1") || !strcasecmp(curlSslVer,"TLSv1_1"))
+#if LIBCURL_VERSION_NUM >= 0x072200
+ rv = curl_easy_setopt(mHandle, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_1);
+#else
+ throw URLException("WBEMCLI_CURL_SSLVERSION=TLSv1.1 requires libcurl 7.34 or greater");
+#endif
+ else if (!strcasecmp(curlSslVer,"TLSv1.2") || !strcasecmp(curlSslVer,"TLSv1_2"))
+#if LIBCURL_VERSION_NUM >= 0x072200
+ rv = curl_easy_setopt(mHandle, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2);
+#else
+ throw URLException("WBEMCLI_CURL_SSLVERSION=TLSv1.2 requires libcurl 7.34 or greater");
+#endif
+ else
+ throw URLException("unknown WBEMCLI_CURL_SSLVERSION");
+ }
/* Set username and password */
if (url.user.length() > 0 && url.password.length() > 0) {
diff -up sblim-wbemcli-1.6.1/man/wbemcli.1.pre.in.orig sblim-wbemcli-1.6.1/man/wbemcli.1.pre.in
--- sblim-wbemcli-1.6.1/man/wbemcli.1.pre.in.orig 2015-08-10 14:00:11.217163540 +0200
+++ sblim-wbemcli-1.6.1/man/wbemcli.1.pre.in 2015-08-10 14:00:31.215283763 +0200
@@ -554,6 +554,13 @@ The example in the previous section can
wbemcli gi 'myCimom/root/cimv2:rpm_package.name="glibc"'
.PP
+.SH ENVIRONMENT
+.TP
+.B WBEMCLI_CURL_SSLVERSION
+Specifies the SSL protocol that will be used.
+Valid values are SSLv2, SSLv3, TLSv1, TLSv1.0, TLSv1.1 or TLSv1.2.
+If this variable is not set, wbemcli will attempt to figure out the
+remote SSL protocol version.
.SH FILES
.TP
.I @CACERT@

@ -0,0 +1,23 @@
@@ -, +, @@
---
main.cpp | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
--- a/main.cpp
+++ a/main.cpp
@@ -133,6 +133,7 @@ int main (int argc, char *argv[]) {
ClassesXml *ca=0;
MethodresponseXml *mrsp=0;
string sb;
+ {
#ifdef HAVE_LIBWWW
CimomWww cimom;
#elif HAVE_LIBCURL
@@ -643,6 +644,7 @@ fini:
delete cna;
delete ca;
delete mrsp;
+ }
#ifdef HAVE_LIBCURL
// These needs to be called once
curl_global_cleanup();
--

@ -0,0 +1,97 @@
diff -up sblim-wbemcli-1.6.3/CimCurl.cpp.orig sblim-wbemcli-1.6.3/CimCurl.cpp
--- sblim-wbemcli-1.6.3/CimCurl.cpp.orig 2019-08-27 14:18:53.329846123 +0200
+++ sblim-wbemcli-1.6.3/CimCurl.cpp 2019-08-27 14:18:53.332846130 +0200
@@ -369,6 +369,7 @@ void CimomCurl::setClientCertificates(co
} else if (cacert) {
FILE *fp;
if ((fp = fopen(cacert, "r"))) {
+ fclose(fp);
if ((rv=curl_easy_setopt(mHandle,CURLOPT_SSL_VERIFYPEER,1))) {
cerr << getErrorMessage(rv) << endl;
throw HttpException("Could not enable peer verification.");
@@ -377,7 +378,6 @@ void CimomCurl::setClientCertificates(co
cerr << getErrorMessage(rv) << endl;
throw HttpException("Could not load CA certificate.");
}
- fclose(fp);
} else {
throw HttpException(
string("Could not open CA certificate file: ") + string(cacert)
diff -up sblim-wbemcli-1.6.3/CimXml.cpp.orig sblim-wbemcli-1.6.3/CimXml.cpp
--- sblim-wbemcli-1.6.3/CimXml.cpp.orig 2014-10-13 18:05:30.000000000 +0200
+++ sblim-wbemcli-1.6.3/CimXml.cpp 2019-08-27 14:32:20.068589450 +0200
@@ -159,7 +159,7 @@ int XmlBuffer::skipElement(const char *t
cerr<<"--- XmlBuffer::skipElement(\""<<t<<"\")"<<endl;
#endif
char eTag[256]="</";
- strcat(eTag,t);
+ strncat(eTag,t,252);
strcat(eTag,">");
char *e=strstr(cur,eTag);
if (e) {
@@ -451,7 +451,7 @@ AVPs::AVPs(char *s, PropertyArray &prop)
AVPs::AVPs(char *s, ParameterArray &param)
{
- char *n, *t, *u, *v, *w;
+ char *n, *t, *u, *v;
int i,k,j,l;
bool name = false;
bool addAValue = false;
@@ -856,8 +856,6 @@ IMethodresponseXml::IMethodresponseXml(X
if (irv->getReturnData() == NULL) {
/* OpenWBEM support */
throw NoReturnValue();
- delete irv;
- irv=NULL;
}
if (xb.endTag("IMETHODRESPONSE")) return;
else throw ParseException("Expecting </IMETHODRESPONSE> tag(2)");
@@ -877,8 +875,6 @@ IMethodresponseXml::IMethodresponseXml(X
}
*/ else if (xb.endTag("IMETHODRESPONSE")) {
throw NoReturnValue();
- irv=NULL;
- return;
}
/* else throw ParseException("Expecting </IMETHODRESPONSE> tag(1)");
}
@@ -934,8 +930,6 @@ MethodresponseXml::MethodresponseXml(Xml
}
*/ else if (xb.endTag("METHODRESPONSE")) {
throw NoReturnValue();
- rvl=NULL;
- return;
}
/* else throw ParseException("Expecting </METHODRESPONSE> tag(1)");
}
@@ -2950,7 +2944,7 @@ char *strndup(char *f, int n) {
URL::URL(const char *U)
{
- int pint,indir=0;
+ int indir=0;
char *p,*q,*phelp,*np,*last,*un,*b,*h,*z;
char *origu, *u;
u = origu = strdup(U);
@@ -3061,7 +3055,7 @@ URL::URL(const char *U)
zone_id = -1;
}
- pint=strtol(port.c_str(),&np,10);
+ (void) strtol(port.c_str(),&np,10);
if (*np) throw URLException("Invalid port number");
if (!phelp || strlen(phelp+1) == 0) {
@@ -3168,9 +3162,11 @@ int URL::getNetDeviceNum(string devName)
while (2 == fscanf(fp, scnfmt.c_str(), &dev_num, dev_name)) {
if (strcmp(devName.c_str(), dev_name) == 0) { /* match */
+ fclose(fp);
return dev_num;
}
}
+ fclose(fp);
return -1; // zone id not found in interfaces table
#endif
}

@ -0,0 +1,11 @@
diff -up sblim-wbemcli-1.6.3/main.cpp.orig sblim-wbemcli-1.6.3/main.cpp
--- sblim-wbemcli-1.6.3/main.cpp.orig 2022-05-02 10:36:09.283825148 +0200
+++ sblim-wbemcli-1.6.3/main.cpp 2022-05-02 10:36:33.440858294 +0200
@@ -286,6 +286,7 @@ int main (int argc, char *argv[]) {
op==GetProperty ||
op==SetProperty ||
op==CallMethod ||
+ op==CallMethodX ||
op==ModifyInstance) && !xtraStr)
throw CmdException("Invalid command invocation 2");

@ -0,0 +1,25 @@
diff -up sblim-wbemcli-1.6.3/main.cpp.orig sblim-wbemcli-1.6.3/main.cpp
--- sblim-wbemcli-1.6.3/main.cpp.orig 2019-08-21 11:27:58.881274422 +0200
+++ sblim-wbemcli-1.6.3/main.cpp 2019-08-21 11:27:58.886274433 +0200
@@ -655,5 +655,5 @@ fini:
// These needs to be called once
curl_global_cleanup();
#endif
- return 0;
+ return retval;
}
diff -up sblim-wbemcli-1.6.3/man/wbemcli.1.pre.in.orig sblim-wbemcli-1.6.3/man/wbemcli.1.pre.in
--- sblim-wbemcli-1.6.3/man/wbemcli.1.pre.in.orig 2019-08-21 11:27:58.883274426 +0200
+++ sblim-wbemcli-1.6.3/man/wbemcli.1.pre.in 2019-08-21 11:27:58.886274433 +0200
@@ -565,6 +565,11 @@ remote SSL protocol version.
.TP
.I @CACERT@
The default CA certificate file. Can be overriden with \-cacert.
+.SH EXIT CODES
+.IP 0
+Normal termination.
+.IP 16
+Abnormal termination, see diagnostics printed to the standard error.
.SH AUTHOR
Adrian Schuur <schuur@de.ibm.com>
.SH BUGS

@ -0,0 +1,214 @@
Name: sblim-wbemcli
Version: 1.6.3
Release: 22%{?dist}
Summary: SBLIM WBEM Command Line Interface
License: EPL-1.0
URL: https://sourceforge.net/projects/sblim/
Source0: http://downloads.sourceforge.net/sblim/%{name}-%{version}.tar.bz2
Patch0: sblim-wbemcli-1.5.1-gcc43.patch
Patch1: sblim-wbemcli-1.6.2-https-segfaults.patch
Patch2: sblim-wbemcli-1.6.1-ssl-proto-option.patch
Patch3: sblim-wbemcli-1.6.3-fix-exit-status.patch
Patch4: sblim-wbemcli-1.6.3-covscan-fixes.patch
Patch5: sblim-wbemcli-1.6.3-fix-cmx-crash.patch
BuildRequires: make
BuildRequires: curl-devel >= 7.9.3
BuildRequires: binutils-devel >= 2.17.50.0.3-4
BuildRequires: autoconf automake libtool pkgconfig
BuildRequires: gcc-c++
Requires: curl >= 7.9.3
%description
WBEM Command Line Interface is a standalone, command line WBEM client. It is
specially suited for basic systems management tasks as it can be used in
scripts.
%prep
%setup -q
autoreconf --install --force
%patch0 -p1 -b .gcc43
%patch1 -p1 -b .https-segfaults
%patch2 -p1 -b .ssl-proto-option
%patch3 -p1 -b .fix-exit-status
%patch4 -p1 -b .covscan-fixes
%patch5 -p1 -b .fix-cmx-crash
%build
%configure CACERT=/etc/pki/Pegasus/client.pem
make %{?_smp_mflags}
%install
make install DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/%{name}
%files
%license COPYING
%{_bindir}/wbem*
%{_mandir}/man1/*
%{_datadir}/%{name}
%changelog
* Mon May 23 2022 Vitezslav Crhonek <vcrhonek@redhat.com> - 1.6.3-22
- Fix crash when using "cmx" command with no additional parameter
Resolves: #2083577
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 1.6.3-21
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.6.3-20
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.3-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.3-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.3-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Tue Aug 27 2019 Vitezslav Crhonek <vcrhonek@redhat.com> - 1.6.3-16
- Fix exit status (i. e. apply https://sourceforge.net/p/sblim/bugs/2761/)
- Fix issues found by static analysis
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.3-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Tue May 14 2019 Vitezslav Crhonek <vcrhonek@redhat.com> - 1.6.3-14
- Fix URL
- Use correct short name for Eclipse Public License 1.0
- Use %%license
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.3-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.3-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Tue Feb 27 2018 Vitezslav Crhonek <vcrhonek@redhat.com> - 1.6.3-11
- Add BuildRequires gcc-c++
- Remove Group tag
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.3-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.3-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.3-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.3-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Thu Mar 17 2016 Vitezslav Crhonek <vcrhonek@redhat.com> - 1.6.3-6
- Update default CA certificate file path due to recent changes in tog-pegasus
Related: #1308809
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.3-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Mon Aug 10 2015 Vitezslav Crhonek <vcrhonek@redhat.com> - 1.6.3-4
- Backport configurable SSL version feature from upstream and update man
page accordingly
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 1.6.3-2
- Rebuilt for GCC 5 C++11 ABI change
* Wed Oct 15 2014 Vitezslav Crhonek <vcrhonek@redhat.com> - 1.6.3-1
- Update to sblim-wbemcli-1.6.3
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.2-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.2-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Tue Mar 11 2014 Vitezslav Crhonek <vcrhonek@redhat.com> - 1.6.2-11
- Use upstream accepted patch for fixing wbemcli issue with dot character
* Tue Feb 18 2014 Vitezslav Crhonek <vcrhonek@redhat.com> - 1.6.2-10
- Support aarch64
Resolves: #926488
* Thu Jan 30 2014 Vitezslav Crhonek <vcrhonek@redhat.com> - 1.6.2-9
- Fix wbemcli doesn't accept dot (.) as password character on command line
Resolves: #959885
- Fix bogus date in the %%changelog
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.2-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Mon Apr 29 2013 Vitezslav Crhonek <vcrhonek@redhat.com> - 1.6.2-7
- Fix wrong usage of libcurl API, which caused segfaults when wbemcli was used
with https scheme (patch by kdudka@redhat.com)
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Mon Sep 10 2012 Vitezslav Crhonek <vcrhonek@redhat.com> - 1.6.2-5
- Fix issues found by fedora-review utility in the spec file
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.2-3
- Rebuilt for c++ ABI breakage
* Thu Jan 05 2012 Vitezslav Crhonek <vcrhonek@redhat.com> - 1.6.2-2
- Fix gcc47 compile failure
* Tue Jul 19 2011 Vitezslav Crhonek <vcrhonek@redhat.com> - 1.6.2-1
- Update to sblim-wbemcli-1.6.2
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Thu Dec 9 2010 Vitezslav Crhonek <vcrhonek@redhat.com> - 1.6.1-1
- Update to sblim-wbemcli-1.6.1
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Sat Feb 28 2009 Caolán McNamara - 1.6.0-4
- constify rets of strchr(const char *);
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Tue Nov 4 2008 Vitezslav Crhonek <vcrhonek@redhat.com> - 1.6.0-2
- Fix License
- Spec file cleanup, rpmlint check
* Fri Oct 24 2008 Vitezslav Crhonek <vcrhonek@redhat.com> - 1.6.0-1
- Update to 1.6.0
Resolves: #468328
* Fri Jun 20 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.5.1-7
- fix gcc43 compile failure
* Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.5.1-6
- Autorebuild for GCC 4.3
* Mon Nov 06 2006 Jindrich Novy <jnovy@redhat.com> - 1.5.1-5
- rebuild against new curl
* Thu Oct 05 2006 Christian Iseli <Christian.Iseli@licr.org> - 1.5.1-4
- rebuilt for unwind info generation, broken in gcc-4.1.1-21
* Mon Nov 21 2005 Viktor Mihajlovski <mihajlov@de.ibm.com> - 1.5.1-1
- Upgrade to version 1.5.1 (SSL V3 enforced, default CACERT).
- Created Fedora/RH specific spec file.
* Fri Oct 28 2005 Viktor Mihajlovski <mihajlov@de.ibm.com> - 1.5.0-1
- Minor enhancements for Fedora compatibility, still not daring to
nuke the build root though
* Thu Jul 28 2005 Viktor Mihajlovski <mihajlov@de.ibm.com> - 1.5.0-0
- Updates for rpmlint complaints
Loading…
Cancel
Save