summaryrefslogtreecommitdiffstats
path: root/pykolab/utils.py
diff options
context:
space:
mode:
authorLiutauras Adomaitis <adomaitis@kolabsystems.com>2019-04-03 15:54:46 +0300
committerLiutauras Adomaitis <adomaitis@kolabsystems.com>2019-04-03 17:08:16 +0300
commitb636df531742a076aaf3e22f271f73801e4f856e (patch)
tree6e0abf8921c92cd27bcd0869197cc34842db5c1a /pykolab/utils.py
parent8e00e9f37828d773d3d03facc997d6601ca0f6b9 (diff)
downloadpykolab-b636df531742a076aaf3e22f271f73801e4f856e.tar.gz
Changes required for pykolab to work with AD
Summary: These changes basically are to remove referrals from the ldapsearch results. The change is cache sqlite DB schema is required to allow objectGUID AD attribute to work as unique attribute to track LDAP objects. Reviewers: vanmeeuwen, machniak, mollekopf Reviewed By: machniak Subscribers: #pykolab_developers Tags: #pykolab Differential Revision: https://git.kolab.org/D720
Diffstat (limited to 'pykolab/utils.py')
-rw-r--r--pykolab/utils.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/pykolab/utils.py b/pykolab/utils.py
index 8bc82e5..9794a57 100644
--- a/pykolab/utils.py
+++ b/pykolab/utils.py
@@ -364,7 +364,12 @@ def normalize(_object):
if _object[key] is None:
continue
- val = map(_strip, _object[key])
+ # Dont run strip anything from attributes which
+ # hold byte strings
+ if key.lower() in constants.BINARY_ATTRS:
+ val = _object[key]
+ else:
+ val = map(_strip, _object[key])
if len(val) == 1:
result[key.lower()] = ''.join(val)