mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Handle missing /etc/ipa in ipa-client-install
Make sure /etc/ipa is created and owned by freeipa-python package. Report correct error to user if /etc/ipa is missing during client installation. https://fedorahosted.org/freeipa/ticket/3551
This commit is contained in:
committed by
Rob Crittenden
parent
9125285a05
commit
2a8f1b0b16
@@ -655,7 +655,6 @@ fi
|
||||
%dir %{_usr}/share/ipa/ui/images
|
||||
%{_usr}/share/ipa/ui/images/*.png
|
||||
%{_usr}/share/ipa/ui/images/*.gif
|
||||
%dir %{_sysconfdir}/ipa
|
||||
%dir %{_sysconfdir}/ipa/html
|
||||
%config(noreplace) %{_sysconfdir}/ipa/html/ffconfig.js
|
||||
%config(noreplace) %{_sysconfdir}/ipa/html/ffconfig_page.js
|
||||
@@ -790,6 +789,7 @@ fi
|
||||
%{python_sitelib}/ipapython-*.egg-info
|
||||
%{python_sitelib}/freeipa-*.egg-info
|
||||
%{python_sitearch}/python_default_encoding-*.egg-info
|
||||
%dir %attr(0755,root,apache) %config(noreplace) %{_sysconfdir}/ipa/
|
||||
%ghost %attr(0644,root,apache) %config(noreplace) %{_sysconfdir}/ipa/default.conf
|
||||
%ghost %attr(0644,root,apache) %config(noreplace) %{_sysconfdir}/ipa/ca.crt
|
||||
|
||||
|
||||
@@ -1608,6 +1608,9 @@ def get_ca_cert(fstore, options, server, basedn):
|
||||
url = file_url()
|
||||
try:
|
||||
get_ca_cert_from_file(url)
|
||||
except errors.FileError, e:
|
||||
root_logger.debug(e)
|
||||
raise
|
||||
except Exception, e:
|
||||
root_logger.debug(e)
|
||||
raise errors.NoCertificateError(entry=url)
|
||||
@@ -1658,6 +1661,9 @@ def get_ca_cert(fstore, options, server, basedn):
|
||||
except Exception, e:
|
||||
os.unlink(ca_file)
|
||||
raise
|
||||
except errors.FileError, e:
|
||||
root_logger.debug(e)
|
||||
raise
|
||||
except (errors.NoCertificateError, errors.LDAPError), e:
|
||||
root_logger.debug(str(e))
|
||||
url = http_url()
|
||||
@@ -2106,6 +2112,9 @@ def install(options, env, fstore, statestore):
|
||||
os.environ['KRB5_CONFIG'] = env['KRB5_CONFIG']
|
||||
get_ca_cert(fstore, options, cli_server[0], cli_basedn)
|
||||
del os.environ['KRB5_CONFIG']
|
||||
except errors.FileError, e:
|
||||
root_logger.error(e)
|
||||
return CLIENT_INSTALL_ERROR
|
||||
except Exception, e:
|
||||
root_logger.error("Cannot obtain CA certificate\n%s", e)
|
||||
return CLIENT_INSTALL_ERROR
|
||||
|
||||
Reference in New Issue
Block a user