From 593e0b5d000f8a7836bcb4abf02e5d1a62d85cc9 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 2 Nov 2002 07:54:04 +0000 Subject: Clean up this a little - add comments describing a bit of what is going on here. (This used to be commit 88455313f6551a75eff4df2f0ba91430948c1c78) --- source3/passdb/pdb_ldap.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index 866c4f6b76..22358cb47d 100644 --- a/source3/passdb/pdb_ldap.c +++ b/source3/passdb/pdb_ldap.c @@ -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); -- cgit