diff options
author | Christian Heimes <cheimes@redhat.com> | 2016-11-28 16:24:33 +0100 |
---|---|---|
committer | Jan Cholasta <jcholast@redhat.com> | 2016-12-02 09:14:35 +0100 |
commit | 1e6a204b4372bbbfb722a00370a5ce4e34406b9f (patch) | |
tree | b8deef8cc3b4f04990f5d305eafdeff14d5d8928 /daemons | |
parent | 98f0077360884da6df31b351caaed7510dec94de (diff) | |
download | freeipa-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 'daemons')
-rwxr-xr-x | daemons/dnssec/ipa-dnskeysync-replica | 5 | ||||
-rwxr-xr-x | daemons/dnssec/ipa-dnskeysyncd | 5 | ||||
-rwxr-xr-x | daemons/dnssec/ipa-ods-exporter | 5 |
3 files changed, 12 insertions, 3 deletions
diff --git a/daemons/dnssec/ipa-dnskeysync-replica b/daemons/dnssec/ipa-dnskeysync-replica index 9363d3f3e..9bf19eeab 100755 --- a/daemons/dnssec/ipa-dnskeysync-replica +++ b/daemons/dnssec/ipa-dnskeysync-replica @@ -122,7 +122,10 @@ def ldap2replica_zone_keys_sync(log, ldapkeydb, localhsm): # IPA framework initialization -ipalib.api.bootstrap(in_server=True, log=None) # no logging to file +ipalib.api.bootstrap( + context='dns', confdir=paths.ETC_IPA, + in_server=True, log=None, # no logging to file +) ipalib.api.finalize() standard_logging_setup(verbose=True, debug = True) # debug=ipalib.api.env.debug) log = root_logger diff --git a/daemons/dnssec/ipa-dnskeysyncd b/daemons/dnssec/ipa-dnskeysyncd index d42515466..fc1a0f6cf 100755 --- a/daemons/dnssec/ipa-dnskeysyncd +++ b/daemons/dnssec/ipa-dnskeysyncd @@ -19,7 +19,10 @@ from ipaplatform.paths import paths from ipaserver.dnssec.keysyncer import KeySyncer # IPA framework initialization -api.bootstrap(in_server=True, log=None) # no logging to file +api.bootstrap( + context='dns', confdir=paths.ETC_IPA, + in_server=True, log=None, # no logging to file +) api.finalize() standard_logging_setup(verbose=True, debug=api.env.debug) log = root_logger diff --git a/daemons/dnssec/ipa-ods-exporter b/daemons/dnssec/ipa-ods-exporter index 9285fe695..260a7b651 100755 --- a/daemons/dnssec/ipa-ods-exporter +++ b/daemons/dnssec/ipa-ods-exporter @@ -614,7 +614,10 @@ elif len(sys.argv) == 2: log.addHandler(console) # IPA framework initialization -ipalib.api.bootstrap(in_server=True, log=None) # no logging to file +ipalib.api.bootstrap( + context='dns', confdir=paths.ETC_IPA, + in_server=True, log=None, # no logging to file +) ipalib.api.finalize() # Kerberos initialization |