Hi,

the attached patch fixes <https://fedorahosted.org/freeipa/ticket/4371>.

Honza

--
Jan Cholasta
>From 76204f58608ee9f85b704f71909449bed0173253 Mon Sep 17 00:00:00 2001
From: Jan Cholasta <jchol...@redhat.com>
Date: Thu, 24 Jul 2014 17:17:48 +0200
Subject: [PATCH] Exclude attributelevelrights from --raw result processing in
 baseldap.

https://fedorahosted.org/freeipa/ticket/4371
---
 ipalib/plugins/baseldap.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/ipalib/plugins/baseldap.py b/ipalib/plugins/baseldap.py
index e5a23b9..b112c35 100644
--- a/ipalib/plugins/baseldap.py
+++ b/ipalib/plugins/baseldap.py
@@ -240,9 +240,11 @@ def entry_from_entry(entry, newentry):
 def entry_to_dict(entry, **options):
     if options.get('raw', False):
         result = {}
-        for attr, value in entry.raw.iteritems():
-            if entry.conn.get_type(attr) is not str:
-                value = list(value)
+        for attr in entry.iterkeys():
+            if attr.lower() == 'attributelevelrights':
+                value = entry[attr]
+            elif entry.conn.get_type(attr) is not str:
+                value = list(entry.raw[attr])
                 for (i, v) in enumerate(value):
                     try:
                         value[i] = v.decode('utf-8')
-- 
1.9.3

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to