X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fmain.c;h=85f2eababaa6ddfb792366da64559a9f502ffeab;hb=03b58cc9cfb7f46d90e76cbd5d1f2b763830174d;hp=a7cae58e9563725bfcf8b655045ce0f4f0b7b293;hpb=170836751a1fde72bc53325da4d45919c3850fdf;p=openldap diff --git a/servers/slapd/main.c b/servers/slapd/main.c index a7cae58e95..85f2eababa 100644 --- a/servers/slapd/main.c +++ b/servers/slapd/main.c @@ -1,3 +1,7 @@ +/* + * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved. + * COPYING RESTRICTIONS APPLY, see COPYRIGHT file + */ #include "portable.h" #include @@ -101,7 +105,7 @@ usage( char *name ) #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 @@ -149,7 +153,11 @@ int main( int argc, char **argv ) 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; @@ -158,7 +166,6 @@ int main( int argc, char **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 ) @@ -267,7 +274,9 @@ int main( int argc, char **argv ) #ifdef LDAP_CONNECTIONLESS case 'c': /* do connectionless (udp) */ - udp = 1; + /* udp = 1; */ + fprintf( stderr, "connectionless support not supported"); + exit( EXIT_FAILURE ); break; #endif @@ -320,7 +329,11 @@ int main( int argc, char **argv ) 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 ) {