]> git.sur5r.net Git - openldap/commitdiff
allow optional overlays
authorPierangelo Masarati <ando@openldap.org>
Tue, 13 Apr 2004 18:49:31 +0000 (18:49 +0000)
committerPierangelo Masarati <ando@openldap.org>
Tue, 13 Apr 2004 18:49:31 +0000 (18:49 +0000)
servers/slapd/config.c

index 2edeab448a63b089aed6bcee2bd180a3491eacda..5efcd1153658c3fffd27857e7fd248c2127b604e 100644 (file)
@@ -979,8 +979,21 @@ read_config( const char *fname, int depth )
 #endif
                                return 1;
 
-                       } else if ( overlay_config( be, cargv[1] )) {
-                               return 1;
+                       } else {
+                               if ( cargv[1][0] == '-' && overlay_config( be, &cargv[1][1] ) ) {
+                                       /* log error */
+#ifdef NEW_LOGGING
+                                       LDAP_LOG( CONFIG, INFO, "%s: line %d: "
+                                               "(optional) overlay \"%s\" configuration "
+                                               "failed (ignored)\n", fname, lineno, &cargv[1][1] );
+#else
+                                       Debug( LDAP_DEBUG_ANY, "%s: line %d: "
+                                               "(optional) overlay \"%s\" configuration "
+                                               "failed (ignored)\n", fname, lineno, &cargv[1][1] );
+#endif
+                               } else if ( overlay_config( be, cargv[1] ) ) {
+                                       return 1;
+                               }
                        }
 
                /* set database suffix */