The Identity, Policy and Audit system
CentOS Sources
2016-11-03 403b09ab980c02ef36095973349a13e0181c794a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
From 71910b902993cb0b263bc5a6483fcce733820c80 Mon Sep 17 00:00:00 2001
From: Jan Cholasta <jcholast@redhat.com>
Date: Thu, 1 Sep 2016 09:59:37 +0200
Subject: [PATCH] rpcserver: fix crash in XML-RPC system commands
 
Fix an AttributeError in XML-RPC methodSignature and methodHelp commands
caused by incorrect mangled name usage.
 
https://fedorahosted.org/freeipa/ticket/6217
 
Reviewed-By: Lenka Doudova <ldoudova@redhat.com>
Reviewed-By: David Kupka <dkupka@redhat.com>
---
 ipaserver/rpcserver.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
 
diff --git a/ipaserver/rpcserver.py b/ipaserver/rpcserver.py
index dd446ae849076d350c97ce9cd6c5a704783f39c0..f1d5a40694f015fd7f9ad05836ec55c6906d764e 100644
--- a/ipaserver/rpcserver.py
+++ b/ipaserver/rpcserver.py
@@ -311,7 +311,7 @@ class WSGIExecutioner(Executioner):
         if 'wsgi_dispatch' in self.api.Backend:
             self.api.Backend.wsgi_dispatch.mount(self, self.key)
 
-    def __get_command(self, name):
+    def _get_command(self, name):
         try:
             # assume version 1 for unversioned command calls
             command = self.api.Command[name, '1']
@@ -362,7 +362,7 @@ class WSGIExecutioner(Executioner):
             if name in self._system_commands:
                 result = self._system_commands[name](self, *args, **options)
             else:
-                command = self.__get_command(name)
+                command = self._get_command(name)
                 result = command(*args, **options)
         except PublicError as e:
             if self.api.env.debug:
@@ -713,7 +713,7 @@ class xmlserver(KerberosWSGIExecutioner):
             # for now let's not go out of our way to document standard XML-RPC
             return u'undef'
         else:
-            self.__get_command(method_name)
+            self._get_command(method_name)
 
             # All IPA commands return a dict (struct),
             # and take a params, options - list and dict (array, struct)
@@ -725,7 +725,7 @@ class xmlserver(KerberosWSGIExecutioner):
         if method_name in self._system_commands:
             return u''
         else:
-            command = self.__get_command(method_name)
+            command = self._get_command(method_name)
             return unicode(command.doc or '')
 
     _system_commands = {
-- 
2.7.4