diff options
author | Ondrej Hamada <ohamada@redhat.com> | 2012-04-12 14:19:15 +0200 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2012-05-28 17:09:22 +0200 |
commit | bdc80fe372fa937a0cf4a411f550ae35caad3e42 (patch) | |
tree | 1a605fb99284b29ce958647751659cc940d47a0e /ipa-client | |
parent | ae1257517064362188b893a939cb336c48097256 (diff) | |
download | freeipa-bdc80fe372fa937a0cf4a411f550ae35caad3e42.tar.gz freeipa-bdc80fe372fa937a0cf4a411f550ae35caad3e42.tar.xz freeipa-bdc80fe372fa937a0cf4a411f550ae35caad3e42.zip |
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
Diffstat (limited to 'ipa-client')
-rwxr-xr-x | ipa-client/ipa-install/ipa-client-install | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ipa-client/ipa-install/ipa-client-install b/ipa-client/ipa-install/ipa-client-install index 6854581d2..dce363a35 100755 --- a/ipa-client/ipa-install/ipa-client-install +++ b/ipa-client/ipa-install/ipa-client-install @@ -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" |