pgreco / rpms / ipa

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

Blame SOURCES/0023-prevent-search-for-RADIUS-proxy-servers-by-secret.patch

403b09
From 57e8d1c6ff58bc58d50d0b1d501820f55a6f2837 Mon Sep 17 00:00:00 2001
403b09
From: Martin Babinsky <mbabinsk@redhat.com>
403b09
Date: Thu, 21 Jul 2016 09:42:01 +0200
403b09
Subject: [PATCH] prevent search for RADIUS proxy servers by secret
403b09
403b09
radiusproxy-find should not allow search by proxy secret even for privileged
403b09
users so we should hide it from CLI.
403b09
403b09
https://fedorahosted.org/freeipa/ticket/6078
403b09
403b09
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
403b09
---
403b09
 ipaserver/plugins/radiusproxy.py | 8 ++++++++
403b09
 1 file changed, 8 insertions(+)
403b09
403b09
diff --git a/ipaserver/plugins/radiusproxy.py b/ipaserver/plugins/radiusproxy.py
403b09
index 5657e002c1ce66335b7697b98f95a49207c61d87..3391b8aed77205fb1a586d5472d8cfdbc9fd1cd5 100644
403b09
--- a/ipaserver/plugins/radiusproxy.py
403b09
+++ b/ipaserver/plugins/radiusproxy.py
403b09
@@ -169,6 +169,14 @@ class radiusproxy_find(LDAPSearch):
403b09
         '%(count)d RADIUS proxy server matched', '%(count)d RADIUS proxy servers matched', 0
403b09
     )
403b09
 
403b09
+    def get_options(self):
403b09
+        for option in super(radiusproxy_find, self).get_options():
403b09
+            if option.name == 'ipatokenradiussecret':
403b09
+                option = option.clone(flags={'no_option'})
403b09
+
403b09
+            yield option
403b09
+
403b09
+
403b09
 @register()
403b09
 class radiusproxy_show(LDAPRetrieve):
403b09
     __doc__ = _('Display information about a RADIUS proxy server.')
403b09
-- 
403b09
2.7.4
403b09