+/*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
#include "portable.h"
#include <stdio.h>
#if defined(HAVE_SETUID) && defined(HAVE_SETGID)
"\t-g group\tGroup (id or name) to ran as\n"
#endif
- "\t-h URLs\tList of URLs to serve"
+ "\t-h URLs\tList of URLs to serve\n"
#ifdef LOG_LOCAL4
"\t-l sysloguser\tSyslog User (default: LOCAL4)\n"
#endif
int serverMode = SLAP_SERVER_MODE;
int port = LDAP_PORT;
+#ifdef HAVE_TLS
int tls_port = LDAPS_PORT;
+#else
+ int tls_port = 0;
+#endif
g_argc = argc;
g_argv = argv;
{
int *i;
char *newConfigFile;
- ldap_debug = 0xffff;
if ( is_NT_Service ) CommenceStartupProcessing( NTservice, slap_set_shutdown );
i = (int*)getRegParam( NULL, "Port" );
if ( i != NULL )
#ifdef LDAP_CONNECTIONLESS
case 'c': /* do connectionless (udp) */
- udp = 1;
+ /* udp = 1; */
+ fprintf( stderr, "connectionless support not supported");
+ exit( EXIT_FAILURE );
break;
#endif
openlog( serverName, OPENLOG_OPTIONS );
#endif
- slapd_daemon_init( urls, port, tls_port );
+ if( slapd_daemon_init( urls, port, tls_port ) != 0 ) {
+ rc = 1;
+ SERVICE_EXIT( ERROR_SERVICE_SPECIFIC_ERROR, 16 );
+ goto stop;
+ }
#if defined(HAVE_SETUID) && defined(HAVE_SETGID)
if ( username != NULL || groupname != NULL ) {