|
|
403b09 |
From 71910b902993cb0b263bc5a6483fcce733820c80 Mon Sep 17 00:00:00 2001
|
|
|
403b09 |
From: Jan Cholasta <jcholast@redhat.com>
|
|
|
403b09 |
Date: Thu, 1 Sep 2016 09:59:37 +0200
|
|
|
403b09 |
Subject: [PATCH] rpcserver: fix crash in XML-RPC system commands
|
|
|
403b09 |
|
|
|
403b09 |
Fix an AttributeError in XML-RPC methodSignature and methodHelp commands
|
|
|
403b09 |
caused by incorrect mangled name usage.
|
|
|
403b09 |
|
|
|
403b09 |
https://fedorahosted.org/freeipa/ticket/6217
|
|
|
403b09 |
|
|
|
403b09 |
Reviewed-By: Lenka Doudova <ldoudova@redhat.com>
|
|
|
403b09 |
Reviewed-By: David Kupka <dkupka@redhat.com>
|
|
|
403b09 |
---
|
|
|
403b09 |
ipaserver/rpcserver.py | 8 ++++----
|
|
|
403b09 |
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
|
403b09 |
|
|
|
403b09 |
diff --git a/ipaserver/rpcserver.py b/ipaserver/rpcserver.py
|
|
|
403b09 |
index dd446ae849076d350c97ce9cd6c5a704783f39c0..f1d5a40694f015fd7f9ad05836ec55c6906d764e 100644
|
|
|
403b09 |
--- a/ipaserver/rpcserver.py
|
|
|
403b09 |
+++ b/ipaserver/rpcserver.py
|
|
|
403b09 |
@@ -311,7 +311,7 @@ class WSGIExecutioner(Executioner):
|
|
|
403b09 |
if 'wsgi_dispatch' in self.api.Backend:
|
|
|
403b09 |
self.api.Backend.wsgi_dispatch.mount(self, self.key)
|
|
|
403b09 |
|
|
|
403b09 |
- def __get_command(self, name):
|
|
|
403b09 |
+ def _get_command(self, name):
|
|
|
403b09 |
try:
|
|
|
403b09 |
# assume version 1 for unversioned command calls
|
|
|
403b09 |
command = self.api.Command[name, '1']
|
|
|
403b09 |
@@ -362,7 +362,7 @@ class WSGIExecutioner(Executioner):
|
|
|
403b09 |
if name in self._system_commands:
|
|
|
403b09 |
result = self._system_commands[name](self, *args, **options)
|
|
|
403b09 |
else:
|
|
|
403b09 |
- command = self.__get_command(name)
|
|
|
403b09 |
+ command = self._get_command(name)
|
|
|
403b09 |
result = command(*args, **options)
|
|
|
403b09 |
except PublicError as e:
|
|
|
403b09 |
if self.api.env.debug:
|
|
|
403b09 |
@@ -713,7 +713,7 @@ class xmlserver(KerberosWSGIExecutioner):
|
|
|
403b09 |
# for now let's not go out of our way to document standard XML-RPC
|
|
|
403b09 |
return u'undef'
|
|
|
403b09 |
else:
|
|
|
403b09 |
- self.__get_command(method_name)
|
|
|
403b09 |
+ self._get_command(method_name)
|
|
|
403b09 |
|
|
|
403b09 |
# All IPA commands return a dict (struct),
|
|
|
403b09 |
# and take a params, options - list and dict (array, struct)
|
|
|
403b09 |
@@ -725,7 +725,7 @@ class xmlserver(KerberosWSGIExecutioner):
|
|
|
403b09 |
if method_name in self._system_commands:
|
|
|
403b09 |
return u''
|
|
|
403b09 |
else:
|
|
|
403b09 |
- command = self.__get_command(method_name)
|
|
|
403b09 |
+ command = self._get_command(method_name)
|
|
|
403b09 |
return unicode(command.doc or '')
|
|
|
403b09 |
|
|
|
403b09 |
_system_commands = {
|
|
|
403b09 |
--
|
|
|
403b09 |
2.7.4
|
|
|
403b09 |
|