Clean up this a little - add comments describing a bit of what is going on
authorAndrew Bartlett <abartlet@samba.org>
Sat, 2 Nov 2002 07:54:04 +0000 (07:54 +0000)
committerAndrew Bartlett <abartlet@samba.org>
Sat, 2 Nov 2002 07:54:04 +0000 (07:54 +0000)
here.

source/passdb/pdb_ldap.c

index 866c4f6b76ef1903d78d13cfad2610765255de7f..22358cb47d162f9b648883a82a9d84f8da4fc684 100644 (file)
@@ -963,13 +963,14 @@ static BOOL init_sam_from_ldap (struct ldapsam_privates *ldap_state,
        }
 
 
+       /* 
+        * If so configured, try and get the values from LDAP 
+        */
 
-       if (lp_ldap_trust_ids() && (get_unix_attributes(ldap_state,sampass, entry))) {
+       if (!lp_ldap_trust_ids() || (!get_unix_attributes(ldap_state, sampass, entry))) {
                
-       } else {
-
-               /* These values MAY be in LDAP, but they can also be retrieved through 
-                *  sys_getpw*() which is how we're doing it 
+               /* 
+                * Otherwise just ask the system getpw() calls.
                 */
        
                pw = getpwnam_alloc(username);