--- ./servers/slapd/config.c.orig	2005-03-30 12:54:12.000000000 +0200
+++ ./servers/slapd/config.c	2005-03-30 15:21:02.000000000 +0200
@@ -27,6 +27,7 @@
 #include "portable.h"
 
 #include <stdio.h>
+#include <glob.h>
 
 #include <ac/string.h>
 #include <ac/ctype.h>
@@ -122,6 +123,8 @@
 	static BackendDB	*be = NULL;
 	char	*next;
 
+	glob_t globres;
+
 
 	vals[1].bv_val = NULL;
 
@@ -2358,8 +2361,22 @@
 			savefname = ch_strdup( cargv[1] );
 			savelineno = lineno;
 
-			if ( read_config( savefname, depth+1 ) != 0 ) {
-				return( 1 );
+			/* apply globbing */	
+			if(glob(savefname, GLOB_NOCHECK, NULL, &globres) == 0 && globres.gl_pathc > 0) {
+				for(i = 0; i < globres.gl_pathc; i++) {
+#ifdef NEW_LOGGING
+					LDAP_LOG( CONFIG, INFO, 
+						"%s: line %d: reading config file \""
+						"%s\".\n", fname, lineno , gl_pathv[i], 0 );
+#endif
+					if ( read_config( globres.gl_pathv[i], depth+1 ) != 0 ) {
+						return( 1 );
+					}
+				}
+			} else {
+				if ( read_config( savefname, depth+1 ) != 0 ) {
+					return( 1 );
+				}
 			}
 
 			free( savefname );
