summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2012-09-15 18:18:49 +0000
committerArthur de Jong <arthur@arthurdejong.org>2012-09-15 18:18:49 +0000
commit6c0818054092065df184e31b89bba3cc9b4a7b38 (patch)
treea83d38277d5dfa1dfaa56b6ff732bed08242c20d
parent542e46b0f21830fcf3950bfcfcf0d80759e09f16 (diff)
only check nsswitch.conf for shadow mapping on glibc (Solaris shadow map follows passwd's mapping and FreeBSD doesn't have shadow at all)
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1768 ef36b2f9-881f-0410-afb5-c4e39611909c
-rw-r--r--nslcd/passwd.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/nslcd/passwd.c b/nslcd/passwd.c
index 2869595..b0e9245 100644
--- a/nslcd/passwd.c
+++ b/nslcd/passwd.c
@@ -385,6 +385,14 @@ char *uid2dn(MYLDAP_SESSION *session,const char *uid,char *buf,size_t buflen)
return myldap_cpy_dn(entry,buf,buflen);
}
+#ifndef NSS_FLAVOUR_GLIBC
+
+/* only check nsswitch.conf for glibc */
+#define check_nsswitch_reload()
+#define shadow_uses_ldap() (1)
+
+#else /* NSS_FLAVOUR_GLIBC */
+
/* the cached value of whether shadow lookups use LDAP in nsswitch.conf */
#define NSSWITCH_FILE "/etc/nsswitch.conf"
#define CACHED_UNKNOWN 22
@@ -431,6 +439,8 @@ static inline int shadow_uses_ldap(void)
return cached_shadow_uses_ldap;
}
+#endif /* NSS_FLAVOUR_GLIBC */
+
/* the maximum number of uidNumber attributes per entry */
#define MAXUIDS_PER_ENTRY 5