Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/nslcd/shadow.c
diff options
context:
space:
mode:
Diffstat (limited to 'nslcd/shadow.c')
-rw-r--r--nslcd/shadow.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/nslcd/shadow.c b/nslcd/shadow.c
index a8392f9..a381306 100644
--- a/nslcd/shadow.c
+++ b/nslcd/shadow.c
@@ -5,7 +5,7 @@
Copyright (C) 1997-2005 Luke Howard
Copyright (C) 2006 West Consulting
- Copyright (C) 2006, 2007, 2008 Arthur de Jong
+ Copyright (C) 2006, 2007, 2008, 2009 Arthur de Jong
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -44,7 +44,7 @@
*/
/* the search base for searches */
-const char *shadow_base = NULL;
+const char *shadow_bases[NSS_LDAP_CONFIG_MAX_BASES] = { NULL };
/* the search scope for searches */
int shadow_scope = LDAP_SCOPE_DEFAULT;
@@ -92,9 +92,11 @@ static int mkfilter_shadow_byname(const char *name,
static void shadow_init(void)
{
- /* set up base */
- if (shadow_base==NULL)
- shadow_base=nslcd_cfg->ldc_base;
+ int i;
+ /* set up search bases */
+ if (shadow_bases[0]==NULL)
+ for (i=0;i<NSS_LDAP_CONFIG_MAX_BASES;i++)
+ shadow_bases[i]=nslcd_cfg->ldc_bases[i];
/* set up scope */
if (shadow_scope==LDAP_SCOPE_DEFAULT)
shadow_scope=nslcd_cfg->ldc_scope;