]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/config.c
Fix memory leak.
[openldap] / servers / slapd / config.c
index ce1d40a3f7e95d94f54b8cf098047c3ffdfdd1c6..b2412ad39dcc6cc30e06003dea8ef4349666d30a 100644 (file)
@@ -1,7 +1,7 @@
 /* config.c - configuration file handling routines */
 /* $OpenLDAP$ */
 /*
- * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
  */
 
@@ -76,13 +76,6 @@ read_config( const char *fname )
 
        Debug( LDAP_DEBUG_CONFIG, "reading config file %s\n", fname, 0, 0 );
 
-       if ( schema_init( ) != 0 ) {
-               Debug( LDAP_DEBUG_ANY,
-                   "error initializing the schema\n",
-                   0, 0, 0 );
-               return( 1 );
-       }
-
        fp_getline_init( &lineno );
 
        while ( (line = fp_getline( fp, &lineno )) != NULL ) {
@@ -462,7 +455,13 @@ read_config( const char *fname )
                                p = strchr(saveline,'(');
                                parse_oc( fname, lineno, p, cargv );
                        } else {
+#ifdef SLAPD_SCHEMA_NOT_COMPAT
+                               Debug( LDAP_DEBUG_ANY,
+    "%s: line %d: old objectclass format not supported.\n",
+                                   fname, lineno, 0 );
+#else
                                parse_oc_old( be, fname, lineno, cargc, cargv );
+#endif
                        }
 
                /* specify an attribute type */
@@ -474,8 +473,14 @@ read_config( const char *fname )
                                p = strchr(saveline,'(');
                                parse_at( fname, lineno, p, cargv );
                        } else {
-                               attr_syntax_config( fname, lineno, cargc - 1,
+#ifdef SLAPD_SCHEMA_NOT_COMPAT
+                               Debug( LDAP_DEBUG_ANY,
+    "%s: line %d: old attribute type format not supported.\n",
+                                   fname, lineno, 0 );
+#else
+                               at_config( fname, lineno, cargc - 1,
                                    &cargv[1] );
+#endif
                        }
 
                /* turn on/off schema checking */