diff options
author | Jan Cholasta <jcholast@redhat.com> | 2013-10-31 16:54:21 +0000 |
---|---|---|
committer | Petr Viktorin <pviktori@redhat.com> | 2014-01-24 20:38:15 +0100 |
commit | c2bd6f365d2b65082f72bd9eb104e79e8c507fe3 (patch) | |
tree | 31449afe21beb62edf20982c2215568997eb6c11 /ipalib/plugins/trust.py | |
parent | 5737eaf1348ba101ae227fa79fb4451a2413fc84 (diff) | |
download | freeipa.git-c2bd6f365d2b65082f72bd9eb104e79e8c507fe3.tar.gz freeipa.git-c2bd6f365d2b65082f72bd9eb104e79e8c507fe3.tar.xz freeipa.git-c2bd6f365d2b65082f72bd9eb104e79e8c507fe3.zip |
Convert remaining frontend code to LDAPEntry API.
Diffstat (limited to 'ipalib/plugins/trust.py')
-rw-r--r-- | ipalib/plugins/trust.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/ipalib/plugins/trust.py b/ipalib/plugins/trust.py index 0b6db27c..5ab4b25f 100644 --- a/ipalib/plugins/trust.py +++ b/ipalib/plugins/trust.py @@ -456,7 +456,7 @@ sides. base_dn=DN(api.env.container_trusts, api.env.basedn), filter=trust_filter) - result['result'] = entry_to_dict(trusts[0][1], **options) + result['result'] = entry_to_dict(trusts[0], **options) # For AD trusts with algorithmic mapping, we need to add a separate # range for each subdomain. @@ -778,9 +778,7 @@ class trust_find(LDAPSearch): if options.get('pkey_only', False): return truncated - for entry in entries: - (dn, attrs) = entry - + for attrs in entries: # Translate ipanttrusttype to trusttype if --raw not used if not options.get('raw', False): attrs['trusttype'] = trust_type_string(attrs['ipanttrusttype'][0]) @@ -897,7 +895,7 @@ class trustconfig(LDAPObject): # and not "ipausergroup" so that it can also match groups like # "Default SMB Group" which does not have this objectclass. try: - (dn, group_entry) = self.backend.find_entry_by_attr( + group_entry = self.backend.find_entry_by_attr( self.api.Object['group'].primary_key.name, group, ['posixgroup'], @@ -906,7 +904,7 @@ class trustconfig(LDAPObject): except errors.NotFound: self.api.Object['group'].handle_not_found(group) else: - entry_attrs['ipantfallbackprimarygroup'] = [dn] + entry_attrs['ipantfallbackprimarygroup'] = [group_entry.dn] def _convert_groupdn(self, entry_attrs, options): """ |