rel-eng/packages/spacecmd | 2 +-
spacecmd/spacecmd.spec | 5 ++++-
spacecmd/src/lib/misc.py | 2 +-
3 files changed, 6 insertions(+), 3 deletions(-)
New commits:
commit 9e80ddcd08c8b67a1cd013f118135badf5b1496c
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Oct 2 13:58:12 2013 +0200
Automatic commit of package [spacecmd] release [2.1.11-1].
diff --git a/rel-eng/packages/spacecmd b/rel-eng/packages/spacecmd
index d50effe..f7438dd 100644
--- a/rel-eng/packages/spacecmd
+++ b/rel-eng/packages/spacecmd
@@ -1 +1 @@
-2.1.10-1 spacecmd/
+2.1.11-1 spacecmd/
diff --git a/spacecmd/spacecmd.spec b/spacecmd/spacecmd.spec
index d98321c..75e2158 100644
--- a/spacecmd/spacecmd.spec
+++ b/spacecmd/spacecmd.spec
@@ -4,7 +4,7 @@
%endif
Name: spacecmd
-Version: 2.1.10
+Version: 2.1.11
Release: 1%{?dist}
Summary: Command-line interface to Spacewalk and Satellite servers
@@ -64,6 +64,9 @@ touch %{buildroot}/%{python_sitelib}/spacecmd/__init__.py
%doc %{_mandir}/man1/spacecmd.1.gz
%changelog
+* Wed Oct 02 2013 Michael Mraka <michael.mraka(a)redhat.com> 2.1.11-1
+- spacecmd: Fix session validation
+
* Mon Sep 30 2013 Michael Mraka <michael.mraka(a)redhat.com> 2.1.10-1
- removed trailing whitespaces
commit 524dfd5bd855b90f174b57238bcca1df76b24fce
Author: David Juran <djuran(a)redhat.com>
Date: Tue Oct 1 15:26:02 2013 +0200
spacecmd: Fix session validation
Turns out that although spacewalk (Red Hat Satellite 5.5) takes a
session argument for the api.getApiNamespaces() API call, this session is not
validated, i.e. the call will succeed no matter if the session is
valid or not. Which makes this particular call quite a bad choice
validating the session... Trying now to use user.listAssignableRoles
instead
diff --git a/spacecmd/src/lib/misc.py b/spacecmd/src/lib/misc.py
index dff6fb3..f2769d5 100644
--- a/spacecmd/src/lib/misc.py
+++ b/spacecmd/src/lib/misc.py
@@ -307,7 +307,7 @@ def do_login(self, args):
try:
logging.debug('Using cached credentials from %s' % session_file)
- self.client.api.getApiNamespaces(self.session)
+ self.client.user.listAssignableRoles(self.session)
except:
logging.warning('Cached credentials are invalid')
self.current_user = ''
Show replies by date