]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/config.c
Add OpenLDAP RCSid to *.[ch] in clients, libraries, and servers.
[openldap] / servers / slapd / config.c
index 4d7d999c617e774c500a045c74892396b073ddfc..493045cdf2dfe24ad6494fe0a107b042170c8613 100644 (file)
@@ -1,4 +1,5 @@
 /* config.c - configuration file handling routines */
+/* $OpenLDAP$ */
 /*
  * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
@@ -16,7 +17,6 @@
 #include <ac/socket.h>
 
 #include "ldap_pvt.h"
-#include "ldap_defaults.h"
 #include "slap.h"
 
 #define MAXARGS        100
@@ -28,6 +28,7 @@ int           defsize = SLAPD_DEFAULT_SIZELIMIT;
 int            deftime = SLAPD_DEFAULT_TIMELIMIT;
 AccessControl  *global_acl = NULL;
 int            global_default_access = ACL_READ;
+int            global_readonly = 0;
 char           *replogfile;
 int            global_lastmod = ON;
 int            global_idletimeout = 0;
@@ -133,9 +134,6 @@ read_config( const char *fname )
                        bi = NULL;
                        be = backend_db_init( cargv[1] );
 
-               /* assign a default depth limit for alias deref */
-               be->be_max_deref_depth = SLAPD_DEFAULT_MAXDEREFDEPTH; 
-
                /* get pid file name */
                } else if ( strcasecmp( cargv[0], "pidfile" ) == 0 ) {
                        if ( cargc < 2 ) {
@@ -369,9 +367,7 @@ read_config( const char *fname )
                                return( 1 );
                        }
                        if ( be == NULL ) {
-                               Debug( LDAP_DEBUG_ANY,
-"%s: line %d: readonly line must appear inside a database definition (ignored)\n",
-                                   fname, lineno, 0 );
+                               global_readonly = (strcasecmp( cargv[1], "on" ) == 0);
                        } else {
                                if ( strcasecmp( cargv[1], "on" ) == 0 ) {
                                        be->be_readonly = 1;