summaryrefslogtreecommitdiffstats
path: root/ipa-python
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2008-02-11 09:42:47 -0500
committerRob Crittenden <rcritten@redhat.com>2008-02-11 09:42:47 -0500
commit0300952ec7ddeb5b31e34ee2c7a17e58430d2d47 (patch)
tree5f0844c9d24e8ac93ff8794acfe66111883438e9 /ipa-python
parent5be3defccfc4f14d2b36aa1917ae9ec018a36d8e (diff)
downloadfreeipa-0300952ec7ddeb5b31e34ee2c7a17e58430d2d47.tar.gz
freeipa-0300952ec7ddeb5b31e34ee2c7a17e58430d2d47.tar.xz
freeipa-0300952ec7ddeb5b31e34ee2c7a17e58430d2d47.zip
Use ldap_explode_dn instead of ldap_str2dn so we can use python-ldap 2.2.0
Diffstat (limited to 'ipa-python')
-rw-r--r--ipa-python/aci.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/ipa-python/aci.py b/ipa-python/aci.py
index 5d5981431..58a3b1d24 100644
--- a/ipa-python/aci.py
+++ b/ipa-python/aci.py
@@ -151,12 +151,11 @@ def extract_group_cns(aci_list, client):
for aci in aci_list:
for dn in (aci.source_group, aci.dest_group):
if not group_dn_to_cn.has_key(dn):
- rdn_list = ldap.dn.str2dn(dn)
+ rdn_list = ldap.explode_dn(dn, 0)
first_rdn = rdn_list[0]
- for (type,value,junk) in first_rdn:
- if type == "cn":
- group_dn_to_cn[dn] = value
- break;
+ (type,value) = first_rdn.split('=')
+ if type == "cn":
+ group_dn_to_cn[dn] = value
else:
try:
group = client.get_entry_by_dn(dn, ['cn'])