pgreco / rpms / ipa

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

Blame SOURCES/0009-ipa-advise_update_url_of_cacerdir_rehash_tool_9cfd07e_rhbz#1658287.patch

6d47df
From 9cfd07e87964f37465dd699a50444e6953291f59 Mon Sep 17 00:00:00 2001
6d47df
From: Petr Vobornik <pvoborni@redhat.com>
6d47df
Date: Oct 23 2018 14:48:53 +0000
6d47df
Subject: ipa-advise: update url of cacerdir_rehash tool
6d47df
6d47df
6d47df
On legacy systems which don't have cacerdir_rehash tool (provided by authconfig)
6d47df
the generated advise script downloads this tool from project page and uses it.
6d47df
6d47df
After decommision of Fedorahosted and move of authconfig project to Pagure,
6d47df
this url was not updated in FreeIPA project.
6d47df
6d47df
This patch updates the url.
6d47df
6d47df
https://pagure.io/freeipa/issue/7731
6d47df
6d47df
Signed-off-by: Petr Vobornik <pvoborni@redhat.com>
6d47df
Reviewed-By: Christian Heimes <cheimes@redhat.com>
6d47df
6d47df
---
6d47df
6d47df
diff --git a/ipaserver/advise/plugins/legacy_clients.py b/ipaserver/advise/plugins/legacy_clients.py
6d47df
index 7916965..2a56922 100644
6d47df
--- a/ipaserver/advise/plugins/legacy_clients.py
6d47df
+++ b/ipaserver/advise/plugins/legacy_clients.py
6d47df
@@ -28,6 +28,9 @@ from ipapython.ipautil import template_file
6d47df
 
6d47df
 register = Registry()
6d47df
 
6d47df
+CACERTDIR_REHASH_URL = ('https://pagure.io/authconfig/raw/master/f/'
6d47df
+                        'cacertdir_rehash')
6d47df
+
6d47df
 
6d47df
 class config_base_legacy_client(Advice):
6d47df
     def get_uri_and_base(self):
6d47df
@@ -50,8 +53,6 @@ class config_base_legacy_client(Advice):
6d47df
                          'location. If this value is different on your system '
6d47df
                          'the script needs to be modified accordingly.\n')
6d47df
 
6d47df
-        cacertdir_rehash = ('https://fedorahosted.org/authconfig/browser/'
6d47df
-                            'cacertdir_rehash?format=txt')
6d47df
         self.log.comment('Download the CA certificate of the IPA server')
6d47df
         self.log.command('mkdir -p -m 755 /etc/openldap/cacerts')
6d47df
         self.log.command('curl http://%s/ipa/config/ca.crt -o '
6d47df
@@ -60,7 +61,8 @@ class config_base_legacy_client(Advice):
6d47df
         self.log.comment('Generate hashes for the openldap library')
6d47df
         self.log.command('command -v cacertdir_rehash')
6d47df
         self.log.command('if [ $? -ne 0 ] ; then')
6d47df
-        self.log.command(' curl "%s" -o cacertdir_rehash ;' % cacertdir_rehash)
6d47df
+        self.log.command(' curl "%s" -o cacertdir_rehash ;' %
6d47df
+                         CACERTDIR_REHASH_URL)
6d47df
         self.log.command(' chmod 755 ./cacertdir_rehash ;')
6d47df
         self.log.command(' ./cacertdir_rehash /etc/openldap/cacerts/ ;')
6d47df
         self.log.command('else')
6d47df