pgreco / rpms / ipa

Forked from forks/areguera/rpms/ipa 4 years ago
Clone

Blame SOURCES/0008-Don-t-return-SSH-keys-with-ipa-host-find-pkey-only.patch

6ec482
From 6672b67ee145db6ed368b50a49bec00f49eccf91 Mon Sep 17 00:00:00 2001
6ec482
From: Rob Crittenden <rcritten@redhat.com>
6ec482
Date: Thu, 1 Aug 2019 13:53:44 -0400
6ec482
Subject: [PATCH] Don't return SSH keys with ipa host-find --pkey-only
6ec482
6ec482
This was introduced in 14ee02dcbd6cbb6c221ac7526e471a9fc58fcc82
6ec482
6ec482
https://pagure.io/freeipa/issue/8029
6ec482
6ec482
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
6ec482
---
6ec482
 ipaserver/plugins/host.py | 3 ++-
6ec482
 1 file changed, 2 insertions(+), 1 deletion(-)
6ec482
6ec482
diff --git a/ipaserver/plugins/host.py b/ipaserver/plugins/host.py
6ec482
index c74a3e58f8af6b33e284ba54b5763a684d91bac3..d6172599d30ec0b2c7b475e59dec22e111e79328 100644
6ec482
--- a/ipaserver/plugins/host.py
6ec482
+++ b/ipaserver/plugins/host.py
6ec482
@@ -1050,7 +1050,8 @@ class host_find(LDAPSearch):
6ec482
                         (filter, hosts_filter), ldap.MATCH_ALL
6ec482
                     )
6ec482
 
6ec482
-        add_sshpubkey_to_attrs_pre(self.context, attrs_list)
6ec482
+        if not options.get('pkey_only', False):
6ec482
+            add_sshpubkey_to_attrs_pre(self.context, attrs_list)
6ec482
 
6ec482
         return (filter.replace('locality', 'l'), base_dn, scope)
6ec482
 
6ec482
-- 
6ec482
2.20.1
6ec482