summaryrefslogtreecommitdiffstats
path: root/install/share/wsgi.py
diff options
context:
space:
mode:
authorChristian Heimes <cheimes@redhat.com>2016-11-28 16:24:33 +0100
committerJan Cholasta <jcholast@redhat.com>2016-12-02 09:14:35 +0100
commit1e6a204b4372bbbfb722a00370a5ce4e34406b9f (patch)
treeb8deef8cc3b4f04990f5d305eafdeff14d5d8928 /install/share/wsgi.py
parent98f0077360884da6df31b351caaed7510dec94de (diff)
downloadfreeipa-1e6a204b4372bbbfb722a00370a5ce4e34406b9f.tar.gz
freeipa-1e6a204b4372bbbfb722a00370a5ce4e34406b9f.tar.xz
freeipa-1e6a204b4372bbbfb722a00370a5ce4e34406b9f.zip
Set explicit confdir option for global contexts
Some API contexts are used to modify global state (e.g. files in /etc and /var). These contexts do not support confdir overrides. Initialize the API with an explicit confdir argument to paths.ETC_IPA. The special contexts are: * backup * cli_installer * installer * ipctl * renew * restore * server * updates The patch also corrects the context of the ipa-httpd-kdcproxy script to 'server'. https://fedorahosted.org/freeipa/ticket/6389 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Diffstat (limited to 'install/share/wsgi.py')
-rw-r--r--install/share/wsgi.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/install/share/wsgi.py b/install/share/wsgi.py
index ee9311e4e..ca97d1e23 100644
--- a/install/share/wsgi.py
+++ b/install/share/wsgi.py
@@ -23,6 +23,7 @@
"""
WSGI appliction for IPA server.
"""
+from ipaplatform.paths import paths
from ipalib import api
from ipalib.config import Env
from ipalib.constants import DEFAULT_CONFIG
@@ -31,11 +32,12 @@ from ipalib.constants import DEFAULT_CONFIG
# by reading in the configuration file(s). The server always reads
# default.conf and will also read in `context'.conf.
env = Env()
-env._bootstrap(context='server', log=None)
+env._bootstrap(context='server', log=None, confdir=paths.ETC_IPA)
env._finalize_core(**dict(DEFAULT_CONFIG))
# Initialize the API with the proper debug level
-api.bootstrap(context='server', debug=env.debug, log=None)
+api.bootstrap(context='server', confdir=paths.ETC_IPA,
+ debug=env.debug, log=None)
try:
api.finalize()
except Exception as e: