Don't return SSH keys with ipa host-find --pkey-only

This was introduced in 14ee02dcbd

https://pagure.io/freeipa/issue/8029

Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
Rob Crittenden
2019-08-01 13:53:44 -04:00
committed by Christian Heimes
parent 9a440ae885
commit 73c32dbfeb

View File

@@ -1061,7 +1061,8 @@ class host_find(LDAPSearch):
(filter, hosts_filter), ldap.MATCH_ALL
)
add_sshpubkey_to_attrs_pre(self.context, attrs_list)
if not options.get('pkey_only', False):
add_sshpubkey_to_attrs_pre(self.context, attrs_list)
return (filter.replace('locality', 'l'), base_dn, scope)