9991ea
From 1a5cf5b28ca3143c72abaa85db59cf827d25a379 Mon Sep 17 00:00:00 2001
9991ea
From: Alexander Bokovoy <abokovoy@redhat.com>
9991ea
Date: Wed, 12 Mar 2014 17:51:43 +0200
9991ea
Subject: [PATCH 59/60] ipaserver/dcerpc: make sure to always return unicode
9991ea
 SID of the trust domain
9991ea
9991ea
Trusted domain SID could be obtained through different means. When it is
9991ea
fetched from the AD DC via LDAP, it needs to be extracted from a default
9991ea
context and explicitly converted to unicode.
9991ea
9991ea
https://fedorahosted.org/freeipa/ticket/4246
9991ea
9991ea
Reviewed-By: Martin Kosek <mkosek@redhat.com>
9991ea
---
9991ea
 ipaserver/dcerpc.py | 2 +-
9991ea
 1 file changed, 1 insertion(+), 1 deletion(-)
9991ea
9991ea
diff --git a/ipaserver/dcerpc.py b/ipaserver/dcerpc.py
9991ea
index 5972e622292a033d4fc979cbf5401fa02151f35c..f1c75089b875787debcee22316a4898b424d923f 100644
9991ea
--- a/ipaserver/dcerpc.py
9991ea
+++ b/ipaserver/dcerpc.py
9991ea
@@ -750,7 +750,7 @@ def retrieve_anonymously(self, remote_host, discover_srv=False):
9991ea
 
9991ea
     def parse_naming_context(self, context):
9991ea
         naming_ref = re.compile('.*<SID=(S-.*)>.*')
9991ea
-        return naming_ref.match(context).group(1)
9991ea
+        return unicode(naming_ref.match(context).group(1))
9991ea
 
9991ea
     def retrieve(self, remote_host):
9991ea
         self.init_lsa_pipe(remote_host)
9991ea
-- 
9991ea
1.8.5.3
9991ea