2 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
4 * Copyright 1998-2005 The OpenLDAP Foundation.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted only as authorized by the OpenLDAP
11 * A copy of this license is available in file LICENSE in the
12 * top-level directory of the distribution or, alternatively, at
13 * <http://www.OpenLDAP.org/license.html>.
15 /* Portions Copyright (c) 1996 Regents of the University of Michigan.
16 * All rights reserved.
18 * Redistribution and use in source and binary forms are permitted
19 * provided that this notice is preserved and that due credit is given
20 * to the University of Michigan at Ann Arbor. The name of the University
21 * may not be used to endorse or promote products derived from this
22 * software without specific prior written permission. This software
23 * is provided ``as is'' without express or implied warranty.
26 * This work was originally developed by the University of Michigan
27 * (as part of U-MICH LDAP).
31 * globals.c - initialization code for global data
38 #include <ac/stdlib.h>
39 #include <ac/string.h>
49 int ldap_syslog_level = LOG_DEBUG;
51 int ldap_syslog_level = 0;
56 * Initialize the globals
68 #ifdef HAVE_NT_SERVICE_MANAGER
69 g->slapd_configfile = ".\\slapd.conf";
70 g->slurpd_rdir = ".\\replica";
72 g->slapd_configfile = SLAPD_DEFAULT_CONFIGFILE;
73 g->slurpd_rdir = DEFAULT_SLURPD_REPLICA_DIR "/replica";
76 g->no_work_interval = DEFAULT_NO_WORK_INTERVAL;
77 g->slurpd_shutdown = 0;
80 g->slapd_replogfile[ 0 ] = '\0';
81 g->slurpd_replogfile[ 0 ] = '\0';
82 g->slurpd_status_file[ 0 ] = '\0';
89 if ( St_init( &(g->st)) < 0 ) {
90 fprintf( stderr, "Cannot initialize status data\n" );
93 ldap_pvt_thread_mutex_init( &(g->rej_mutex) );
94 if ( Rq_init( &(g->rq)) < 0 ) {
95 fprintf( stderr, "Cannot initialize queue\n" );
98 #ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND
99 g->default_srvtab = SRVTAB;
100 #endif /* LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND */