ipa/0001-Guard-import-of-adtrustinstance-for-case-without-tru.patch
Martin Kosek e17b01f313 3.3.3-3
Update to upstream 3.3.3, patch merged from F20.

Fix -Werror=format-security errors (#1037070)
2013-12-03 12:10:14 +01:00

42 lines
1.5 KiB
Diff

From ba5baea9cfd07559ca2f4f7a194999b982af2a24 Mon Sep 17 00:00:00 2001
From: Alexander Bokovoy <abokovoy@redhat.com>
Date: Mon, 4 Nov 2013 17:15:23 +0200
Subject: [PATCH] Guard import of adtrustinstance for case without trusts
https://fedorahosted.org/freeipa/ticket/4011
---
install/tools/ipa-server-install | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/install/tools/ipa-server-install b/install/tools/ipa-server-install
index b3dcf6d93a70e2910a3d7fa62139efbf640d1cbe..458ebba550d0fe7675bd874e23c7d730c53297e6 100755
--- a/install/tools/ipa-server-install
+++ b/install/tools/ipa-server-install
@@ -40,7 +40,12 @@ import pwd
import textwrap
from optparse import OptionGroup, OptionValueError
-from ipaserver.install import adtrustinstance
+try:
+ from ipaserver.install import adtrustinstance
+ _server_trust_ad_installed = True
+except ImportError:
+ _server_trust_ad_installed = False
+
from ipaserver.install import dsinstance
from ipaserver.install import krbinstance
from ipaserver.install import bindinstance
@@ -493,7 +498,8 @@ def uninstall():
httpinstance.HTTPInstance(fstore).uninstall()
krbinstance.KrbInstance(fstore).uninstall()
dsinstance.DsInstance(fstore=fstore).uninstall()
- adtrustinstance.ADTRUSTInstance(fstore).uninstall()
+ if _server_trust_ad_installed:
+ adtrustinstance.ADTRUSTInstance(fstore).uninstall()
memcacheinstance.MemcacheInstance().uninstall()
otpdinstance.OtpdInstance().uninstall()
ipaservices.restore_network_configuration(fstore, sstore)
--
1.8.3.1