Thanks. Updated patch.

On Wed, May 14, 2014 at 3:49 AM, Petr Viktorin <pvikt...@redhat.com> wrote:

> On 05/09/2014 05:09 AM, Gabe Alford wrote:
>
>> Hello,
>>
>>         Came across this issue in my environment the other day and
>> thought I would send a quick patch for review for
>> https://fedorahosted.org/freeipa/ticket/3733
>>
>
> Thanks for the patch!
>
> This works, but configure_nsswitch would now fail if it was called
> options.sssd=True, as nss_value won't be set.
> Please remove the if entirely, and perhaps mention in the function's
> docstring/name that it's for non-SSSD setups only.
>
> --
> Petrł
>
>
From f4ed574a773f2446945ee5141d4c924b4630eb00 Mon Sep 17 00:00:00 2001
From: Gabe <redhatri...@gmail.com>
Date: Wed, 14 May 2014 08:21:34 -0600
Subject: [PATCH] ipa-client-automount should not configure nsswitch.conf
 manually

https://fedorahosted.org/freeipa/ticket/3733
---
 ipa-client/ipa-install/ipa-client-automount | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/ipa-client/ipa-install/ipa-client-automount b/ipa-client/ipa-install/ipa-client-automount
index 2923a8f46903b26da5644737af55917a9d1a8469..b3a0a31d5fa0b68a041fdd1cdc23e11f4e9352e5 100755
--- a/ipa-client/ipa-install/ipa-client-automount
+++ b/ipa-client/ipa-install/ipa-client-automount
@@ -129,17 +129,15 @@ def configure_xml(fstore):
 
 def configure_nsswitch(fstore, options):
     """
-    Point automount to ldap in nsswitch.conf
+    Point automount to ldap in nsswitch.conf. This function is for non-SSSD
+    setups only
     """
     fstore.backup_file(NSSWITCH_CONF)
 
     conf = ipachangeconf.IPAChangeConf("IPA Installer")
     conf.setOptionAssignment(':')
-
-    if options.sssd:
-        nss_value = ' sss files'
-    else:
-        nss_value = ' ldap files'
+    
+    nss_value = ' files ldap'
 
     opts = [{'name':'automount', 'type':'option', 'action':'set', 'value':nss_value},
             {'name':'empty', 'type':'empty'}]
@@ -459,7 +457,8 @@ def main():
         sys.exit("Installation aborted")
 
     try:
-        configure_nsswitch(fstore, options)
+        if not options.sssd:
+            configure_nsswitch(fstore, options)
         configure_nfs(fstore, statestore)
         if options.sssd:
             configure_autofs_sssd(fstore, statestore, autodiscover, options)
-- 
1.9.0

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to