diff --git a/ipalib/plugins/baseuser.py b/ipalib/plugins/baseuser.py index 9c78a521d..af81b9373 100644 --- a/ipalib/plugins/baseuser.py +++ b/ipalib/plugins/baseuser.py @@ -617,7 +617,6 @@ class baseuser_find(LDAPSearch): def post_common_callback(self, ldap, entries, lockout=False, **options): for attrs in entries: - self.obj.get_password_attributes(ldap, attrs.dn, attrs) self.obj.convert_usercertificate_post(attrs, **options) if (lockout): attrs['nsaccountlock'] = True diff --git a/ipalib/plugins/host.py b/ipalib/plugins/host.py index 04bb2991a..1e8b2b6ca 100644 --- a/ipalib/plugins/host.py +++ b/ipalib/plugins/host.py @@ -1024,12 +1024,7 @@ class host_find(LDAPSearch): set_certificate_attrs(entry_attrs) set_kerberos_attrs(entry_attrs, options) rename_ipaallowedtoperform_from_ldap(entry_attrs, options) - self.obj.get_password_attributes(ldap, entry_attrs.dn, entry_attrs) self.obj.suppress_netgroup_memberof(ldap, entry_attrs) - if entry_attrs['has_password']: - # If an OTP is set there is no keytab, at least not one - # fetched anywhere. - entry_attrs['has_keytab'] = False if options.get('all', False): entry_attrs['managing'] = self.obj.get_managed_hosts(entry_attrs.dn) diff --git a/ipatests/test_xmlrpc/test_host_plugin.py b/ipatests/test_xmlrpc/test_host_plugin.py index 47f05a403..ea8f49656 100644 --- a/ipatests/test_xmlrpc/test_host_plugin.py +++ b/ipatests/test_xmlrpc/test_host_plugin.py @@ -416,7 +416,7 @@ class TestManagedHosts(XMLRPC_test): count=1, truncated=False, summary=u'1 host matched', - result=[host.filter_attrs(host.retrieve_keys)], + result=[host.filter_attrs(host.find_keys)], ), result) def search_man_hosts(self, host1, host2): diff --git a/ipatests/test_xmlrpc/tracker/host_plugin.py b/ipatests/test_xmlrpc/tracker/host_plugin.py index 0a69d39c0..67faa1acf 100644 --- a/ipatests/test_xmlrpc/tracker/host_plugin.py +++ b/ipatests/test_xmlrpc/tracker/host_plugin.py @@ -42,6 +42,8 @@ class HostTracker(Tracker): update_keys = retrieve_keys - {'dn'} managedby_keys = retrieve_keys - {'has_keytab', 'has_password'} allowedto_keys = retrieve_keys - {'has_keytab', 'has_password'} + find_keys = retrieve_keys - {'has_keytab', 'has_password'} + find_all_keys = retrieve_all_keys - {'has_keytab', 'has_password'} def __init__(self, name, fqdn=None, default_version=None): super(HostTracker, self).__init__(default_version=default_version) @@ -136,9 +138,9 @@ class HostTracker(Tracker): def check_find(self, result, all=False, raw=False): """Check `host_find` command result""" if all: - expected = self.filter_attrs(self.retrieve_all_keys) + expected = self.filter_attrs(self.find_all_keys) else: - expected = self.filter_attrs(self.retrieve_keys) + expected = self.filter_attrs(self.find_keys) assert_deepequal(dict( count=1, truncated=False, diff --git a/ipatests/test_xmlrpc/tracker/user_plugin.py b/ipatests/test_xmlrpc/tracker/user_plugin.py index 216112db5..5acfc63cd 100644 --- a/ipatests/test_xmlrpc/tracker/user_plugin.py +++ b/ipatests/test_xmlrpc/tracker/user_plugin.py @@ -51,8 +51,12 @@ class UserTracker(Tracker): update_keys = retrieve_keys - {u'dn'} activate_keys = retrieve_keys - find_keys = retrieve_keys - {u'mepmanagedentry', u'memberof_group'} - find_all_keys = retrieve_all_keys + find_keys = retrieve_keys - { + u'mepmanagedentry', u'memberof_group', u'has_keytab', u'has_password' + } + find_all_keys = retrieve_all_keys - { + u'has_keytab', u'has_password' + } primary_keys = {u'uid', u'dn'}