]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-bdb/config.c
ITS#3226: Clear attribute flags after schema_check failed
[openldap] / servers / slapd / back-bdb / config.c
index 7fa83327ac9fa2fac9b34b1f2e9269c047aed93b..4d2dbbbaba7a456457e8247faf781793cf39438d 100644 (file)
@@ -1,8 +1,17 @@
 /* config.c - bdb backend configuration file routine */
 /* $OpenLDAP$ */
-/*
- * Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved.
- * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
+ *
+ * Copyright 2000-2004 The OpenLDAP Foundation.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted only as authorized by the OpenLDAP
+ * Public License.
+ *
+ * A copy of this license is available in the file LICENSE in the
+ * top-level directory of the distribution or, alternatively, at
+ * <http://www.OpenLDAP.org/license.html>.
  */
 
 #include "portable.h"
@@ -163,7 +172,6 @@ bdb_db_config(
                        bdb->bi_search_stack_depth = MINIMUM_SEARCH_STACK_DEPTH;
                }
 
-#ifdef SLAP_IDL_CACHE
        /* size of the IDL cache in entries */
        } else if ( strcasecmp( argv[0], "idlcachesize" ) == 0 ) {
                if ( argc < 2 ) {
@@ -174,8 +182,6 @@ bdb_db_config(
                }
                if ( !( slapMode & SLAP_TOOL_MODE ) )
                        bdb->bi_idl_cache_max_size = atoi( argv[1] );
-#endif
-
        } else if ( strcasecmp( argv[0], "sessionlog" ) == 0 ) {
                int se_id = 0, se_size = 0;
                struct slap_session_entry *sent;
@@ -193,7 +199,6 @@ bdb_db_config(
                }
 
                se_id = atoi( argv[1] );
-               se_size = atoi( argv[2] );
 
                if ( se_id < 0 || se_id > 999 ) {
 #ifdef NEW_LOGGING
@@ -208,7 +213,8 @@ bdb_db_config(
                        return( 1 );
                }
 
-               if ( se_size < 0 || se_size > 999 ) {
+               se_size = atoi( argv[2] );
+               if ( se_size < 0 ) {
 #ifdef NEW_LOGGING
                        LDAP_LOG( CONFIG, CRIT,
                                "%s: line %d: session log size %d is negative\n",
@@ -243,9 +249,7 @@ bdb_db_config(
 
        /* anything else */
        } else {
-               fprintf( stderr, "%s: line %d: "
-                       "unknown directive \"%s\" in bdb database definition (ignored)\n",
-                       fname, lineno, argv[0] );
+               return SLAP_CONF_UNKNOWN;
        }
 
        return 0;