Compare commits

..

No commits in common. "c8s" and "imports/c9/sblim-wbemcli-1.6.3-21.el9" have entirely different histories.

11 changed files with 150 additions and 27 deletions

1
.gitignore vendored
View File

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

1
.sblim-wbemcli.metadata Normal file
View File

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

View File

@ -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
}

View File

@ -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

View File

@ -1,6 +1,6 @@
Name: sblim-wbemcli Name: sblim-wbemcli
Version: 1.6.3 Version: 1.6.3
Release: 16%{?dist} Release: 21%{?dist}
Summary: SBLIM WBEM Command Line Interface Summary: SBLIM WBEM Command Line Interface
License: EPL-1.0 License: EPL-1.0
@ -9,8 +9,10 @@ Source0: http://downloads.sourceforge.net/sblim/%{name}-%{version}.tar.bz
Patch0: sblim-wbemcli-1.5.1-gcc43.patch Patch0: sblim-wbemcli-1.5.1-gcc43.patch
Patch1: sblim-wbemcli-1.6.2-https-segfaults.patch Patch1: sblim-wbemcli-1.6.2-https-segfaults.patch
Patch2: sblim-wbemcli-1.6.1-ssl-proto-option.patch Patch2: sblim-wbemcli-1.6.1-ssl-proto-option.patch
Patch3: sblim-wbemcli-1.6.3-fix-cmx-crash.patch Patch3: sblim-wbemcli-1.6.3-fix-exit-status.patch
Patch4: sblim-wbemcli-1.6.3-covscan-fixes.patch
BuildRequires: make
BuildRequires: curl-devel >= 7.9.3 BuildRequires: curl-devel >= 7.9.3
BuildRequires: binutils-devel >= 2.17.50.0.3-4 BuildRequires: binutils-devel >= 2.17.50.0.3-4
BuildRequires: autoconf automake libtool pkgconfig BuildRequires: autoconf automake libtool pkgconfig
@ -28,7 +30,8 @@ autoreconf --install --force
%patch0 -p1 -b .gcc43 %patch0 -p1 -b .gcc43
%patch1 -p1 -b .https-segfaults %patch1 -p1 -b .https-segfaults
%patch2 -p1 -b .ssl-proto-option %patch2 -p1 -b .ssl-proto-option
%patch3 -p1 -b .fix-cmx-crash %patch3 -p1 -b .fix-exit-status
%patch4 -p1 -b .covscan-fixes
%build %build
%configure CACERT=/etc/pki/Pegasus/client.pem %configure CACERT=/etc/pki/Pegasus/client.pem
@ -45,12 +48,28 @@ mkdir -p $RPM_BUILD_ROOT/%{_datadir}/%{name}
%{_datadir}/%{name} %{_datadir}/%{name}
%changelog %changelog
* Mon May 23 2022 Vitezslav Crhonek <vcrhonek@redhat.com> - 1.6.3-16 * Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 1.6.3-21
- Fix crash when using "cmx" command with no additional parameter - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Resolves: #2075807 Related: rhbz#1991688
* Mon Jul 29 2019 Vitezslav Crhonek <vcrhonek@redhat.com> - 1.6.3-15 * Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.6.3-20
- Rebuild - 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 * Tue May 14 2019 Vitezslav Crhonek <vcrhonek@redhat.com> - 1.6.3-14
- Fix URL - Fix URL

View File

@ -1,6 +0,0 @@
--- !Policy
product_versions:
- rhel-8
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional}

View File

@ -1,11 +0,0 @@
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");

View File

@ -1 +0,0 @@
SHA512 (sblim-wbemcli-1.6.3.tar.bz2) = 19e90f69ecdb6af1d36d8af7f318174f84ffe3ee4f9a2936238ab6bbc37f06f467c8276b496c9b34c11c271596bda4fb6f339839d6aa7ed3b677411df3139f83