mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Always set ipa_hostname for sssd.conf
ipa-client-install will always set ipa_hostname for sssd.conf in order to prevent the client from getting into weird state. https://fedorahosted.org/freeipa/ticket/2527
This commit is contained in:
parent
ae12575170
commit
bdc80fe372
@ -695,7 +695,7 @@ def configure_certmonger(fstore, subject_base, cli_realm, hostname, options):
|
||||
except:
|
||||
print "%s request for host certificate failed" % (cmonger.service_name)
|
||||
|
||||
def configure_sssd_conf(fstore, cli_realm, cli_domain, cli_server, options, client_domain):
|
||||
def configure_sssd_conf(fstore, cli_realm, cli_domain, cli_server, options, client_domain, client_hostname):
|
||||
try:
|
||||
sssdconfig = SSSDConfig.SSSDConfig()
|
||||
sssdconfig.import_config()
|
||||
@ -758,8 +758,7 @@ def configure_sssd_conf(fstore, cli_realm, cli_domain, cli_server, options, clie
|
||||
# the master should only use itself for Kerberos
|
||||
domain.set_option('ipa_server', cli_server)
|
||||
domain.set_option('ipa_domain', cli_domain)
|
||||
if options.hostname:
|
||||
domain.set_option('ipa_hostname', options.hostname)
|
||||
domain.set_option('ipa_hostname', client_hostname)
|
||||
if cli_domain.lower() != cli_realm.lower():
|
||||
domain.set_option('krb5_realm', cli_realm)
|
||||
|
||||
@ -1344,7 +1343,7 @@ def install(options, env, fstore, statestore):
|
||||
# Always back up sssd.conf. It gets updated by authconfig --enablekrb5.
|
||||
fstore.backup_file("/etc/sssd/sssd.conf")
|
||||
if options.sssd:
|
||||
if configure_sssd_conf(fstore, cli_realm, cli_domain, cli_server, options, client_domain):
|
||||
if configure_sssd_conf(fstore, cli_realm, cli_domain, cli_server, options, client_domain, hostname):
|
||||
return CLIENT_INSTALL_ERROR
|
||||
print "Configured /etc/sssd/sssd.conf"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user