main.c 10.8 KB
Newer Older
Kurt Zeilenga's avatar
Kurt Zeilenga committed
1
#include "portable.h"
Kurt Zeilenga's avatar
Kurt Zeilenga committed
2
3
4

#include <stdio.h>

5
#include <ac/signal.h>
Kurt Zeilenga's avatar
Kurt Zeilenga committed
6
7
8
#include <ac/socket.h>
#include <ac/string.h>
#include <ac/time.h>
9
#include <ac/unistd.h>
Hallvard Furuseth's avatar
Hallvard Furuseth committed
10
11
12
#include <ac/wait.h>
#include <ac/signal.h>
#include <ac/errno.h>
Kurt Zeilenga's avatar
Kurt Zeilenga committed
13

14
#include "ldap_defaults.h"
15
#include "slap.h"
16
#include "lutil.h"
Kurt Zeilenga's avatar
Kurt Zeilenga committed
17

18
#ifdef LDAP_SIGCHLD
Hallvard Furuseth's avatar
Hallvard Furuseth committed
19
20
21
static RETSIGTYPE wait4child( int sig );
#endif

22
#ifdef HAVE_WINSOCK
23
#define MAIN_RETURN(x) return
24
25
struct sockaddr_in	bind_addr;

26
/* in nt_main.c */
27
28
29
30
31
extern SERVICE_STATUS			SLAPDServiceStatus;
extern SERVICE_STATUS_HANDLE	hSLAPDServiceStatus;
extern ldap_pvt_thread_cond_t	started_event,		stopped_event;
extern int	  is_NT_Service;

Kurt Zeilenga's avatar
Kurt Zeilenga committed
32
void LogSlapdStartedEvent( char *svc, int slap_debug, char *configfile, char *urls );
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
void LogSlapdStoppedEvent( char *svc );

void CommenceStartupProcessing( LPCTSTR serviceName,
							   void(*stopper)(int));
void ReportSlapdShutdownComplete( void );
void *getRegParam( char *svc, char *value );

#define SERVICE_EXIT( e, n ) \
		if ( is_NT_Service ) \
{ \
			SLAPDServiceStatus.dwWin32ExitCode				= e; \
			SLAPDServiceStatus.dwServiceSpecificExitCode	= n; \
} 
#else
#define SERVICE_EXIT( e, n )
48
#define MAIN_RETURN(x) return(x)
49
50
#endif

51
52
53
54
55
/*
 * when more than one slapd is running on one machine, each one might have
 * it's own LOCAL for syslogging and must have its own pid/args files
 */

Kurt Zeilenga's avatar
Kurt Zeilenga committed
56
#ifndef HAVE_MKVERSION
Kurt Zeilenga's avatar
Kurt Zeilenga committed
57
58
const char Versionstr[] =
	OPENLDAP_PACKAGE " " OPENLDAP_VERSION " Standalone LDAP Server (slapd)";
Kurt Zeilenga's avatar
Kurt Zeilenga committed
59
60
#endif

61
62
63
64
65
#ifdef LOG_LOCAL4

#define DEFAULT_SYSLOG_USER  LOG_LOCAL4

typedef struct _str2intDispatch {
66
67
68
	char    *stringVal;
	int      abbr;
	int      intVal;
69
70
71
72
73
74
75
76
77
78
79
80
81
} STRDISP, *STRDISP_P;


/* table to compute syslog-options to integer */
static STRDISP  syslog_types[] = {
    { "LOCAL0",         6, LOG_LOCAL0 },
    { "LOCAL1",         6, LOG_LOCAL1 },
    { "LOCAL2",         6, LOG_LOCAL2 },
    { "LOCAL3",         6, LOG_LOCAL3 },
    { "LOCAL4",         6, LOG_LOCAL4 },
    { "LOCAL5",         6, LOG_LOCAL5 },
    { "LOCAL6",         6, LOG_LOCAL6 },
    { "LOCAL7",         6, LOG_LOCAL7 },
82
    { NULL }
83
84
};

Hallvard Furuseth's avatar
Hallvard Furuseth committed
85
static int   cnvt_str2int( char *, STRDISP_P, int );
86
87
88
89

#endif  /* LOG_LOCAL4 */


Hallvard Furuseth's avatar
Hallvard Furuseth committed
90
static void
91
usage( char *name )
Kurt Zeilenga's avatar
Kurt Zeilenga committed
92
{
Kurt Zeilenga's avatar
Kurt Zeilenga committed
93
94
95
	fprintf( stderr,
		"usage: %s options\n", name );
	fprintf( stderr,
96
#if LDAP_CONNECTIONLESS
Kurt Zeilenga's avatar
Kurt Zeilenga committed
97
		"\t-c\t\tEnable (experimental) Connectionless LDAP\n"
98
#endif
Kurt Zeilenga's avatar
Kurt Zeilenga committed
99
100
101
102
		"\t-d level\tDebug Level" "\n"
		"\t-f filename\tConfiguration File\n"
#if defined(HAVE_SETUID) && defined(HAVE_SETGID)
		"\t-g group\tGroup (id or name) to ran as\n"
103
#endif
Kurt Zeilenga's avatar
Kurt Zeilenga committed
104
		"\t-h URLs\tList of URLs to serve"
105
#ifdef LOG_LOCAL4
Kurt Zeilenga's avatar
Kurt Zeilenga committed
106
		"\t-l sysloguser\tSyslog User (default: LOCAL4)\n"
107
#endif
Kurt Zeilenga's avatar
Kurt Zeilenga committed
108
109
#ifdef HAVE_WINSOCK
		"\t-n NTserviceName\tNT service name\n"
110
#endif
Kurt Zeilenga's avatar
Kurt Zeilenga committed
111

Kurt Zeilenga's avatar
Kurt Zeilenga committed
112
		"\t-p port\tLDAP Port\n"
Julio Sánchez Fernández's avatar
   
Julio Sánchez Fernández committed
113
#ifdef HAVE_TLS
Kurt Zeilenga's avatar
Kurt Zeilenga committed
114
115
116
117
118
		"\t-P port\tLDAP over TLS Port\n"
#endif
		"\t-s level\tSyslog Level\n"
#ifdef SLAPD_BDB2
		"\t-t\t\tEnable BDB2 timing\n"
Julio Sánchez Fernández's avatar
   
Julio Sánchez Fernández committed
119
#endif
Kurt Zeilenga's avatar
Kurt Zeilenga committed
120
121
122
123
124
#if defined(HAVE_SETUID) && defined(HAVE_SETGID)
		"\t-u user\tUser (id or name) to ran as\n"
#endif
    );
}
125

126
127
128
129
130
#ifdef HAVE_WINSOCK
void WINAPI ServiceMain( DWORD argc, LPTSTR *argv )
#else
int main( int argc, char **argv )
#endif
131
{
Kurt Zeilenga's avatar
Kurt Zeilenga committed
132
	int		i;
Gary Williams's avatar
NT port    
Gary Williams committed
133
	int		rc;
Kurt Zeilenga's avatar
Kurt Zeilenga committed
134
	char *urls = NULL;
135
136
137
#if defined(HAVE_SETUID) && defined(HAVE_SETGID)
	char *username = NULL;
	char *groupname = NULL;
138
#endif
139
140
#ifdef LOG_LOCAL4
    int     syslogUser = DEFAULT_SYSLOG_USER;
141
#endif
142
#ifdef HAVE_WINSOCK
143
	char        *NTservice  = SERVICE_NAME;
144
145
146
	char		*configfile = ".\\slapd.conf";
#else
	char		*configfile = SLAPD_DEFAULT_CONFIGFILE;
147
#endif
148
	char        *serverName;
149
	int         serverMode = SLAP_SERVER_MODE;
Kurt Zeilenga's avatar
Kurt Zeilenga committed
150

Kurt Zeilenga's avatar
Kurt Zeilenga committed
151
	int port = LDAP_PORT;
152
#ifdef HAVE_TLS
Kurt Zeilenga's avatar
Kurt Zeilenga committed
153
	int tls_port = LDAPS_PORT;
154
155
156
#else
	int tls_port = 0;
#endif
157

Kurt Zeilenga's avatar
Kurt Zeilenga committed
158
159
160
	g_argc = argc;
	g_argv = argv;

161
162
#ifdef HAVE_WINSOCK
	{
Kurt Zeilenga's avatar
Kurt Zeilenga committed
163
		int *i;
164
165
		char *newConfigFile;
		ldap_debug = 0xffff;
166
		if ( is_NT_Service ) CommenceStartupProcessing( NTservice, slap_set_shutdown );
Kurt Zeilenga's avatar
Kurt Zeilenga committed
167
168
		i = (int*)getRegParam( NULL, "Port" );
		if ( i != NULL )
169
		{
Kurt Zeilenga's avatar
Kurt Zeilenga committed
170
			port = *i;
171
172
			Debug ( LDAP_DEBUG_ANY, "new port from registry is: %d\n", port, 0, 0 );
		}
Kurt Zeilenga's avatar
Kurt Zeilenga committed
173
174
175
176
177
178
179
180
181
182
#ifdef HAVE_TLS
		i = (int*)getRegParam( NULL, "TLSPort" );
		if ( i != NULL )
		{
			tls_port = *i;
			Debug ( LDAP_DEBUG_ANY, "new TLS port from registry is: %d\n", tls_port, 0, 0 );
		}
#endif
		i = (int*)getRegParam( NULL, "DebugLevel" );
		if ( i != NULL ) 
183
		{
Kurt Zeilenga's avatar
Kurt Zeilenga committed
184
			slap_debug = *i;
185
186
187
188
189
190
191
192
193
194
195
			Debug( LDAP_DEBUG_ANY, "new debug level from registry is: %d\n", slap_debug, 0, 0 );
		}
		newConfigFile = (char*)getRegParam( NULL, "ConfigFile" );
		if ( newConfigFile != NULL ) 
		{
			configfile = newConfigFile;
			Debug ( LDAP_DEBUG_ANY, "new config file from registry is: %s\n", configfile, 0, 0 );
		}
	}
#endif

196
	while ( (i = getopt( argc, argv,
Kurt Zeilenga's avatar
Kurt Zeilenga committed
197
			     "d:f:h:p:s:u"
198
199
200
#ifdef LOG_LOCAL4
			     "l:"
#endif
201
#ifdef SLAPD_BDB2
202
			     "t"
203
#endif
204
205
#if defined(HAVE_SETUID) && defined(HAVE_SETGID)
			     "u:g:"
Kurt Zeilenga's avatar
Kurt Zeilenga committed
206
207
208
#endif
#ifdef LDAP_CONNECTIONLESS
				 "c"
209
210
#endif
#ifdef HAVE_WINSOCK
211
				 "n:"
Julio Sánchez Fernández's avatar
   
Julio Sánchez Fernández committed
212
213
#endif
#ifdef HAVE_TLS
Kurt Zeilenga's avatar
Kurt Zeilenga committed
214
			     "P:"
215
#endif
216
			     )) != EOF ) {
Kurt Zeilenga's avatar
Kurt Zeilenga committed
217
		switch ( i ) {
Kurt Zeilenga's avatar
Kurt Zeilenga committed
218
219
		case 'h':	/* listen URLs */
			urls = ch_strdup( optarg );
220
221
            break;

Kurt Zeilenga's avatar
Kurt Zeilenga committed
222
223
#ifdef LDAP_DEBUG
		case 'd':	/* turn on debugging */
Kurt Zeilenga's avatar
Kurt Zeilenga committed
224
			slap_debug |= atoi( optarg );
Kurt Zeilenga's avatar
Kurt Zeilenga committed
225
226
227
228
229
230
231
232
233
			break;
#else
		case 'd':	/* turn on debugging */
			fprintf( stderr,
			    "must compile with LDAP_DEBUG for debugging\n" );
			break;
#endif

		case 'f':	/* read config file */
234
			configfile = ch_strdup( optarg );
Kurt Zeilenga's avatar
Kurt Zeilenga committed
235
236
			break;

237
		case 'p': {	/* port on which to listen */
Kurt Zeilenga's avatar
Kurt Zeilenga committed
238
239
				int p = atoi( optarg );
				if(! p ) {
240
					fprintf(stderr, "-p %s must be numeric\n", optarg);
Kurt Zeilenga's avatar
Kurt Zeilenga committed
241
242
				} else if( p < 0 || p >= 1<<16) {
					fprintf(stderr, "-p %s invalid\n", optarg);
243
				} else {
Kurt Zeilenga's avatar
Kurt Zeilenga committed
244
					port = p;
245
246
				}
			} break;
Kurt Zeilenga's avatar
Kurt Zeilenga committed
247

Julio Sánchez Fernández's avatar
   
Julio Sánchez Fernández committed
248
249
#ifdef HAVE_TLS
		case 'P': {	/* port on which to listen for TLS */
Kurt Zeilenga's avatar
Kurt Zeilenga committed
250
251
				int p = atoi( optarg );
				if(! p ) {
Julio Sánchez Fernández's avatar
   
Julio Sánchez Fernández committed
252
					fprintf(stderr, "-P %s must be numeric\n", optarg);
Kurt Zeilenga's avatar
Kurt Zeilenga committed
253
254
				} else if( p < 0 || p >= 1<<16) {
					fprintf(stderr, "-P %s invalid\n", optarg);
Julio Sánchez Fernández's avatar
   
Julio Sánchez Fernández committed
255
				} else {
Kurt Zeilenga's avatar
Kurt Zeilenga committed
256
					tls_port = p;
Julio Sánchez Fernández's avatar
   
Julio Sánchez Fernández committed
257
258
259
260
				}
			} break;
#endif

Kurt Zeilenga's avatar
Kurt Zeilenga committed
261
262
263
264
		case 's':	/* set syslog level */
			ldap_syslog = atoi( optarg );
			break;

265
266
#ifdef LOG_LOCAL4
		case 'l':	/* set syslog local user */
Kurt Zeilenga's avatar
Kurt Zeilenga committed
267
268
			syslogUser = cnvt_str2int( optarg,
				syslog_types, DEFAULT_SYSLOG_USER );
269
270
271
			break;
#endif

272
273
#ifdef LDAP_CONNECTIONLESS
		case 'c':	/* do connectionless (udp) */
274
275
			/* udp = 1; */
			fprintf( stderr, "connectionless support not supported");
Kurt Zeilenga's avatar
Kurt Zeilenga committed
276
			exit( EXIT_FAILURE );
Kurt Zeilenga's avatar
Kurt Zeilenga committed
277
			break;
278
#endif
Kurt Zeilenga's avatar
Kurt Zeilenga committed
279

280
281
282
283
284
285
#ifdef SLAPD_BDB2
		case 't':  /* timed server */
			serverMode = SLAP_TIMEDSERVER_MODE;
			break;
#endif

Kurt Zeilenga's avatar
Kurt Zeilenga committed
286
#if defined(HAVE_SETUID) && defined(HAVE_SETGID)
287
288
		case 'u':	/* user name */
			if( username ) free(username);
289
290
291
			username = ch_strdup( optarg );
			break;

292
293
		case 'g':	/* group name */
			if( groupname ) free(groupname);
294
295
			groupname = ch_strdup( optarg );
			break;
296
#endif /* SETUID && GETUID */
Kurt Zeilenga's avatar
Kurt Zeilenga committed
297

298
#ifdef HAVE_WINSOCK
299
		case 'n':  /* NT service name */
300
301
302
			NTservice = ch_strdup( optarg );
			break;
#endif
Kurt Zeilenga's avatar
Kurt Zeilenga committed
303
304
		default:
			usage( argv[0] );
305
306
307
			rc = 1;
			SERVICE_EXIT( ERROR_SERVICE_SPECIFIC_ERROR, 15 );
			goto stop;
Kurt Zeilenga's avatar
Kurt Zeilenga committed
308
309
310
		}
	}

Kurt Zeilenga's avatar
Kurt Zeilenga committed
311
	ber_set_option(NULL, LBER_OPT_DEBUG_LEVEL, &slap_debug);
312
313
314
	ldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, &slap_debug);
	ldif_debug = slap_debug;

Kurt Zeilenga's avatar
Kurt Zeilenga committed
315
316
	Debug( LDAP_DEBUG_TRACE, "%s", Versionstr, 0, 0 );

317
	if ( (serverName = strrchr( argv[0], *LDAP_DIRSEP )) == NULL ) {
318
		serverName = ch_strdup( argv[0] );
Kurt Zeilenga's avatar
Kurt Zeilenga committed
319
	} else {
320
		serverName = ch_strdup( serverName + 1 );
Kurt Zeilenga's avatar
Kurt Zeilenga committed
321
322
323
	}

#ifdef LOG_LOCAL4
324
	openlog( serverName, OPENLOG_OPTIONS, syslogUser );
Kurt Zeilenga's avatar
Kurt Zeilenga committed
325
#else
326
	openlog( serverName, OPENLOG_OPTIONS );
Kurt Zeilenga's avatar
Kurt Zeilenga committed
327
328
#endif

Kurt Zeilenga's avatar
Kurt Zeilenga committed
329
330
331
332
333
	if( slapd_daemon_init( urls, port, tls_port ) != 0 ) {
		rc = 1;
		SERVICE_EXIT( ERROR_SERVICE_SPECIFIC_ERROR, 16 );
		goto stop;
	}
Kurt Zeilenga's avatar
Kurt Zeilenga committed
334

335
#if defined(HAVE_SETUID) && defined(HAVE_SETGID)
Kurt Zeilenga's avatar
Kurt Zeilenga committed
336
	if ( username != NULL || groupname != NULL ) {
337
		slap_init_user( username, groupname );
Kurt Zeilenga's avatar
Kurt Zeilenga committed
338
	}
339
340
#endif

341
	if ( slap_init( serverMode, serverName ) != 0 ) {
342
		rc = 1;
343
		SERVICE_EXIT( ERROR_SERVICE_SPECIFIC_ERROR, 18 );
344
345
346
347
348
		goto destroy;
	}

	if ( read_config( configfile ) != 0 ) {
		rc = 1;
349
		SERVICE_EXIT( ERROR_SERVICE_SPECIFIC_ERROR, 19 );
350
351
352
		goto destroy;
	}

353
354
355
356
357
#ifdef HAVE_TLS
	ldap_pvt_tls_init();
	ldap_pvt_tls_init_def_ctx();
#endif

358
359
	(void) SIGNAL( LDAP_SIGUSR1, slap_do_nothing );
	(void) SIGNAL( LDAP_SIGUSR2, slap_set_shutdown );
360
#ifdef SIGPIPE
361
	(void) SIGNAL( SIGPIPE, SIG_IGN );
362
363
#endif
#ifdef SIGHUP
364
	(void) SIGNAL( SIGHUP, slap_set_shutdown );
365
#endif
366
367
	(void) SIGNAL( SIGINT, slap_set_shutdown );
	(void) SIGNAL( SIGTERM, slap_set_shutdown );
368
369
#ifdef LDAP_SIGCHLD
	(void) SIGNAL( LDAP_SIGCHLD, wait4child );
Hallvard Furuseth's avatar
Hallvard Furuseth committed
370
#endif
371
#ifdef SIGBREAK
372
	/* SIGBREAK is generated when Ctrl-Break is pressed. */
373
374
	(void) SIGNAL( SIGBREAK, slap_set_shutdown );
#endif
375

376
#ifndef HAVE_WINSOCK
377
378
379
380
381
#ifdef LDAP_DEBUG
		lutil_detach( ldap_debug, 0 );
#else
		lutil_detach( 0, 0 );
#endif
Kurt Zeilenga's avatar
Kurt Zeilenga committed
382
#endif /* HAVE_WINSOCK */
383

384
385
	if ( slap_startup(-1)  != 0 ) {
		rc = 1;
386
		SERVICE_EXIT( ERROR_SERVICE_SPECIFIC_ERROR, 20 );
387
388
		goto shutdown;
	}
Kurt Zeilenga's avatar
Kurt Zeilenga committed
389

Kurt Zeilenga's avatar
Kurt Zeilenga committed
390
	{
391
		FILE *fp;
392

393
		Debug( LDAP_DEBUG_ANY, "slapd starting\n", 0, 0, 0 );
394

395
396
397
398
399
		if (( slapd_pid_file != NULL ) &&
			(( fp = fopen( slapd_pid_file, "w" )) != NULL ))
		{
			fprintf( fp, "%d\n", (int) getpid() );
			fclose( fp );
Kurt Zeilenga's avatar
Kurt Zeilenga committed
400
401
		}

402
403
404
405
406
		if (( slapd_args_file != NULL ) &&
			(( fp = fopen( slapd_args_file, "w" )) != NULL ))
		{
			for ( i = 0; i < g_argc; i++ ) {
				fprintf( fp, "%s ", g_argv[i] );
Kurt Zeilenga's avatar
Kurt Zeilenga committed
407
			}
408
409
410
411
			fprintf( fp, "\n" );
			fclose( fp );
		}
	}
Kurt Zeilenga's avatar
Kurt Zeilenga committed
412

413
#ifdef HAVE_WINSOCK
Kurt Zeilenga's avatar
Kurt Zeilenga committed
414
	LogSlapdStartedEvent( NTservice, slap_debug, configfile, urls );
415
416
#endif

Kurt Zeilenga's avatar
Kurt Zeilenga committed
417
	rc = slapd_daemon();
418
419

#ifdef HAVE_WINSOCK
420
	/* Throw away the event that we used during the startup process. */
421
422
423
	if ( is_NT_Service )
		ldap_pvt_thread_cond_destroy( &started_event );
#endif
Kurt Zeilenga's avatar
Kurt Zeilenga committed
424

425
shutdown:
426
427
	/* remember an error during shutdown */
	rc |= slap_shutdown(-1);
428
destroy:
429
430
431
	/* remember an error during destroy */
	rc |= slap_destroy();

432
433
stop:
#ifdef HAVE_WINSOCK
434
	LogSlapdStoppedEvent( NTservice );
435
#endif
Kurt Zeilenga's avatar
Kurt Zeilenga committed
436

437
	Debug( LDAP_DEBUG_ANY, "slapd stopped.\n", 0, 0, 0 );
Kurt Zeilenga's avatar
Kurt Zeilenga committed
438

439
440
441
#ifdef HAVE_WINSOCK
	ReportSlapdShutdownComplete();
#endif
442

443
    closelog();
Kurt Zeilenga's avatar
Kurt Zeilenga committed
444
	slapd_daemon_destroy();
445

446
	MAIN_RETURN(rc);
Kurt Zeilenga's avatar
Kurt Zeilenga committed
447
}
448
449


450
#ifdef LDAP_SIGCHLD
Hallvard Furuseth's avatar
Hallvard Furuseth committed
451
452
453
454
455
456
457
458
459

/*
 *  Catch and discard terminated child processes, to avoid zombies.
 */

static RETSIGTYPE
wait4child( int sig )
{
    int save_errno = errno;
Hallvard Furuseth's avatar
Hallvard Furuseth committed
460
461

#ifdef WNOHANG
Hallvard Furuseth's avatar
Hallvard Furuseth committed
462
    errno = 0;
Hallvard Furuseth's avatar
Hallvard Furuseth committed
463
#ifdef HAVE_WAITPID
Hallvard Furuseth's avatar
Hallvard Furuseth committed
464
465
    while ( waitpid( (pid_t)-1, NULL, WNOHANG ) >= 0 || errno == EINTR )
	;	/* NULL */
Hallvard Furuseth's avatar
Hallvard Furuseth committed
466
#else
Hallvard Furuseth's avatar
Hallvard Furuseth committed
467
468
    while ( wait3( NULL, WNOHANG, NULL ) >= 0 || errno == EINTR )
	;	/* NULL */
Hallvard Furuseth's avatar
Hallvard Furuseth committed
469
#endif
470
#else
Hallvard Furuseth's avatar
Hallvard Furuseth committed
471
472
    (void) wait( NULL );
#endif
Hallvard Furuseth's avatar
Hallvard Furuseth committed
473
    (void) SIGNAL( sig, wait4child );
Hallvard Furuseth's avatar
Hallvard Furuseth committed
474
475
476
477
478
479
    errno = save_errno;
}

#endif /* SIGCHLD || SIGCLD */


480
481
482
483
484
485
486
487
#ifdef LOG_LOCAL4

/*
 *  Convert a string to an integer by means of a dispatcher table
 *  if the string is not in the table return the default
 */

static int
Hallvard Furuseth's avatar
Hallvard Furuseth committed
488
cnvt_str2int( char *stringVal, STRDISP_P dispatcher, int defaultVal )
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
{
    int        retVal = defaultVal;
    STRDISP_P  disp;

    for (disp = dispatcher; disp->stringVal; disp++) {

        if (!strncasecmp (stringVal, disp->stringVal, disp->abbr)) {

            retVal = disp->intVal;
            break;

        }
    }

    return (retVal);
Kurt Zeilenga's avatar
Kurt Zeilenga committed
504
}
505
506

#endif  /* LOG_LOCAL4 */