summaryrefslogtreecommitdiffstats
path: root/ipa_server
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2008-10-14 00:38:17 -0600
committerJason Gerard DeRose <jderose@redhat.com>2008-10-14 00:38:17 -0600
commit149912d0e7bb75459c52c9404a1af537023729dc (patch)
treec9c6d5c72be8f833782e28da3e1cadc897240ddd /ipa_server
parent446037fd60d59f671b9a402b9111ab041c1c1439 (diff)
downloadfreeipa-149912d0e7bb75459c52c9404a1af537023729dc.tar.gz
freeipa-149912d0e7bb75459c52c9404a1af537023729dc.tar.xz
freeipa-149912d0e7bb75459c52c9404a1af537023729dc.zip
Added ldap.get_user_dn() method
Diffstat (limited to 'ipa_server')
-rw-r--r--ipa_server/plugins/b_ldap.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/ipa_server/plugins/b_ldap.py b/ipa_server/plugins/b_ldap.py
index 827e2512..6383bb0b 100644
--- a/ipa_server/plugins/b_ldap.py
+++ b/ipa_server/plugins/b_ldap.py
@@ -35,4 +35,14 @@ class ldap(Backend):
dn = _ldap.dn
+ def get_user_dn(self, uid):
+ """
+ Construct user dn from uid.
+ """
+ return 'uid=%s,%s,%s' % (
+ self.dn.escape_dn_chars(uid),
+ self.api.env.container_user,
+ self.api.env.basedn,
+ )
+
api.register(ldap)