mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Delete empty keytab during client installation
Client installation fails if '/etc/krb5.keytab' exists as a zero-length file. Deleting empty keytab before proceeding with the installation fixes the problem. https://pagure.io/freeipa/issue/7625 Signed-off-by: Armando Neto <abiagion@redhat.com> Reviewed-By: Christian Heimes <cheimes@redhat.com>
This commit is contained in:
committed by
Christian Heimes
parent
1d3c308bf1
commit
cf1301fb06
@@ -2126,6 +2126,16 @@ def install_check(options):
|
|||||||
logger.warning("Option 'force-join' has no additional effect "
|
logger.warning("Option 'force-join' has no additional effect "
|
||||||
"when used with together with option 'keytab'.")
|
"when used with together with option 'keytab'.")
|
||||||
|
|
||||||
|
# Remove invalid keytab file
|
||||||
|
try:
|
||||||
|
gssapi.Credentials(
|
||||||
|
store={'keytab': paths.KRB5_KEYTAB},
|
||||||
|
usage='accept',
|
||||||
|
)
|
||||||
|
except gssapi.exceptions.GSSError:
|
||||||
|
logger.debug("Deleting invalid keytab: '%s'.", paths.KRB5_KEYTAB)
|
||||||
|
remove_file(paths.KRB5_KEYTAB)
|
||||||
|
|
||||||
# Check if old certificate exist and show warning
|
# Check if old certificate exist and show warning
|
||||||
if (
|
if (
|
||||||
not options.ca_cert_file and
|
not options.ca_cert_file and
|
||||||
|
|||||||
Reference in New Issue
Block a user