summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins/entitle.py
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2013-02-04 09:47:00 +0100
committerMartin Kosek <mkosek@redhat.com>2013-03-01 16:59:47 +0100
commita09c50671ecc53af63765afca13edd27ee598081 (patch)
tree07f8c21e0be27b92dfe73ab505ea5bae63fd39cc /ipalib/plugins/entitle.py
parent3aa39547df18bc77ba49720f8a3a1a0052907859 (diff)
downloadfreeipa.git-a09c50671ecc53af63765afca13edd27ee598081.tar.gz
freeipa.git-a09c50671ecc53af63765afca13edd27ee598081.tar.xz
freeipa.git-a09c50671ecc53af63765afca13edd27ee598081.zip
Use full DNs in plugin code.
Diffstat (limited to 'ipalib/plugins/entitle.py')
-rw-r--r--ipalib/plugins/entitle.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/ipalib/plugins/entitle.py b/ipalib/plugins/entitle.py
index 1b821053..e7d66a1c 100644
--- a/ipalib/plugins/entitle.py
+++ b/ipalib/plugins/entitle.py
@@ -144,7 +144,8 @@ def get_uuid(ldap):
entry_attrs = dict(ipaentitlementid=uuid)
dn = ldap.make_dn(
- entry_attrs, 'ipaentitlementid', api.env.container_entitlements,
+ entry_attrs, 'ipaentitlementid',
+ DN(api.env.container_entitlements, api.env.basedn)
)
if not ldap.can_read(dn, 'userpkcs12'):
raise errors.ACIError(
@@ -196,7 +197,7 @@ class entitle(LDAPObject):
try:
(dn, entry_attrs) = self.backend.find_entry_by_attr(
self.primary_key.name, keys[-1], self.object_class, [''],
- self.container_dn
+ DN(self.container_dn, api.env.basedn)
)
except errors.NotFound:
dn = super(entitle, self).get_dn(*keys, **kwargs)
@@ -328,7 +329,8 @@ class entitle_consume(LDAPUpdate):
(db, uuid, certfile, keyfile) = get_uuid(ldap)
entry_attrs['ipaentitlementid'] = uuid
dn = ldap.make_dn(
- entry_attrs, self.obj.uuid_attribute, self.obj.container_dn
+ entry_attrs, self.obj.uuid_attribute,
+ DN(self.obj.container_dn, api.env.basedn)
)
if db is None:
raise errors.NotRegisteredError()
@@ -562,7 +564,8 @@ class entitle_register(LDAPCreate):
raise errors.ACIError(info=e.args[1])
dn = ldap.make_dn(
- entry_attrs, self.obj.uuid_attribute, self.obj.container_dn
+ entry_attrs, self.obj.uuid_attribute,
+ DN(self.obj.container_dn, api.env.basedn)
)
return dn
@@ -718,7 +721,8 @@ class entitle_sync(LDAPUpdate):
shutil.rmtree(db, ignore_errors=True)
dn = ldap.make_dn(
- entry_attrs, self.obj.uuid_attribute, self.obj.container_dn
+ entry_attrs, self.obj.uuid_attribute,
+ DN(self.obj.container_dn, api.env.basedn)
)
return dn