ipa-client-automount: fix '--idmap-domain DNS' logic

Previously '--idmap-domain DNS' would assume the Domain
parameter of idmapd.conf was already absent. With this
fix, the Domain parameter is always removed and the
configuration file is always backuped.

Related-to: https://pagure.io/freeipa/issue/7918
Fixes: https://pagure.io/freeipa/issue/7988
Signed-off-by: François Cami fcami@redhat.com
Reviewed-By: Christian Heimes <cheimes@redhat.com>
This commit is contained in:
François Cami authored and Christian Heimes committed 2019-06-26 12:55:06 +02:00
1 parent 34bfffd1be
commit cc348b990e
1 file changed
+1 -1
+1 -1
View File
@@ -371,7 +371,7 @@ def configure_nfs(fstore, statestore, options):
changes = [conf.setOption('Domain', api.env.domain)]
elif options.idmapdomain == 'DNS':
# Rely on idmapd auto-detection (DNS)
changes = None
changes = [conf.rmOption('Domain')]
else:
# Set NFSv4 domain to what was provided
changes = [conf.setOption('Domain', options.idmapdomain)]