Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/nslcd/protocol.c
diff options
context:
space:
mode:
Diffstat (limited to 'nslcd/protocol.c')
-rw-r--r--nslcd/protocol.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/nslcd/protocol.c b/nslcd/protocol.c
index f83f423..9ea56f8 100644
--- a/nslcd/protocol.c
+++ b/nslcd/protocol.c
@@ -5,7 +5,7 @@
Copyright (C) 1997-2005 Luke Howard
Copyright (C) 2006 West Consulting
- Copyright (C) 2006, 2007 Arthur de Jong
+ Copyright (C) 2006, 2007, 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 *protocol_base = NULL;
+const char *protocol_bases[NSS_LDAP_CONFIG_MAX_BASES] = { NULL };
/* the search scope for searches */
int protocol_scope = LDAP_SCOPE_DEFAULT;
@@ -86,9 +86,11 @@ static int mkfilter_protocol_bynumber(int protocol,
static void protocol_init(void)
{
- /* set up base */
- if (protocol_base==NULL)
- protocol_base=nslcd_cfg->ldc_base;
+ int i;
+ /* set up search bases */
+ if (protocol_bases[0]==NULL)
+ for (i=0;i<NSS_LDAP_CONFIG_MAX_BASES;i++)
+ protocol_bases[i]=nslcd_cfg->ldc_bases[i];
/* set up scope */
if (protocol_scope==LDAP_SCOPE_DEFAULT)
protocol_scope=nslcd_cfg->ldc_scope;