diff options
author | Pavel Zuna <pzuna@redhat.com> | 2010-03-16 15:08:44 +0100 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2010-03-22 11:49:20 -0400 |
commit | c9831d1cc67c5d12a15769c595da9aad7d996e87 (patch) | |
tree | f70ab551a27563817997129e1783102b38adb255 /ipalib/plugins/pwpolicy.py | |
parent | 43ab2c483d91dbac72b44b489fc5cf68a9f57d98 (diff) | |
download | freeipa-c9831d1cc67c5d12a15769c595da9aad7d996e87.tar.gz freeipa-c9831d1cc67c5d12a15769c595da9aad7d996e87.tar.xz freeipa-c9831d1cc67c5d12a15769c595da9aad7d996e87.zip |
Use ldap2.make_*dn* methods in pwpolicy plugin.
Fixes #572423.
Diffstat (limited to 'ipalib/plugins/pwpolicy.py')
-rw-r--r-- | ipalib/plugins/pwpolicy.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ipalib/plugins/pwpolicy.py b/ipalib/plugins/pwpolicy.py index 22af9fb78..483fa9557 100644 --- a/ipalib/plugins/pwpolicy.py +++ b/ipalib/plugins/pwpolicy.py @@ -96,9 +96,13 @@ def make_policy_entry(group_cn, policy_entry): policy_dn = DN of the new password policy entry policy_entry = entry representing this new object """ + ldap = api.Backend.ldap2 # This DN must *NOT* have spaces between elements - policy_dn = "cn=%s,cn=%s,cn=kerberos,%s" % (group_cn, api.env.realm, api.env.basedn) + policy_dn = ldap.make_dn_from_attr( + 'cn', api.env.realm, 'cn=kerberos,%s' % api.env.basedn + ) + policy_dn = ldap.make_dn_from_attr('cn', group_cn, policy_dn) # Create the krb password policy entry. This MUST be located # in the same container as the REALM or the kldap plugin won't |