Use upstream accepted patch for fixing wbemcli issue with dot character

This commit is contained in:
Vitezslav Crhonek 2014-03-11 12:27:31 +01:00
parent 3a39a0faf0
commit cebf39e1bc
2 changed files with 18 additions and 12 deletions

View File

@ -1,14 +1,15 @@
diff -up sblim-wbemcli-1.6.2/CimXml.cpp.dot-in-username-password sblim-wbemcli-1.6.2/CimXml.cpp
--- sblim-wbemcli-1.6.2/CimXml.cpp.dot-in-username-password 2011-06-22 07:58:39.000000000 +0200
+++ sblim-wbemcli-1.6.2/CimXml.cpp 2014-01-30 11:55:56.917316346 +0100
@@ -2985,6 +2985,10 @@ URL::URL(const char *U)
diff -a -u -p -r1.75 CimXml.cpp
--- CimXml.cpp 19 Sep 2013 14:34:26 -0000 1.75
+++ CimXml.cpp 22 Feb 2014 17:47:27 -0000
@@ -2986,9 +2986,9 @@ URL::URL(const char *U)
u += 7;
}
phelp=strchr(u,'@'); // potential auth token delimiter
p=strchr(u,'.'); // potential key/host delimiter (doesn't matter)
- p=strchr(u,'.'); // potential key/host delimiter (doesn't matter)
+ p=NULL;
b=strchr(u,'['); // likely an IPv6 host
+ if (phelp)
+ while (p != NULL && p < phelp)
+ // '.' is in username/password, find next
+ p=strchr(p+1,'.');
if (phelp && ( p==NULL || p > phelp)) {
- if (phelp && ( p==NULL || p > phelp)) {
+ if (phelp) {
// contains auth token[s] -- process them
p=strchr(u,':');
if (b != NULL && p != NULL && (p < b)) {

View File

@ -1,6 +1,6 @@
Name: sblim-wbemcli
Version: 1.6.2
Release: 10%{?dist}
Release: 11%{?dist}
Summary: SBLIM WBEM Command Line Interface
Group: Applications/System
@ -10,6 +10,8 @@ Source0: http://downloads.sourceforge.net/sblim/%{name}-%{version}.tar.bz
Patch0: sblim-wbemcli-1.5.1-gcc43.patch
Patch1: sblim-wbemcli-1.6.2-gcc47.patch
Patch2: sblim-wbemcli-1.6.2-https-segfaults.patch
# Patch3: Fixes wbemcli doesn't accept dot (.) as password character on command line
# Backported from upstream
Patch3: sblim-wbemcli-1.6.2-dot-in-username-password.patch
BuildRequires: curl-devel >= 7.9.3
@ -28,7 +30,7 @@ autoreconf --install --force
%patch0 -p1 -b .gcc43
%patch1 -p1 -b .gcc47
%patch2 -p1 -b .https-segfaults
%patch3 -p1 -b .dot-in-username-password
%patch3 -p0 -b .dot-in-username-password
%build
%configure CACERT=/etc/Pegasus/client.pem
@ -44,6 +46,9 @@ mkdir -p $RPM_BUILD_ROOT/%{_datadir}/%{name}
%{_datadir}/%{name}
%changelog
* 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