]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/config.c
Clean up include logging
[openldap] / servers / slapd / config.c
index adef505afabefc4ac9c69c6ff64d7584c4a7f45c..83019560360b6613c022398503dc5cb1478362ce 100644 (file)
@@ -12,6 +12,7 @@
 #include <ac/string.h>
 #include <ac/ctype.h>
 #include <ac/socket.h>
+#include <ac/errno.h>
 
 #include "lutil.h"
 #include "ldap_pvt.h"
@@ -85,16 +86,21 @@ read_config( const char *fname )
 
        if ( (fp = fopen( fname, "r" )) == NULL ) {
                ldap_syslog = 1;
+#ifdef NEW_LOGGING
+               LDAP_LOG(( "config", LDAP_LEVEL_ENTRY, "read_config: "
+                       "could not open config file \"%s\": %s (%d)\n",
+                   fname, strerror(errno), errno ));
+#else
                Debug( LDAP_DEBUG_ANY,
-                   "could not open config file \"%s\" - absolute path?\n",
-                   fname, 0, 0 );
-               perror( fname );
+                   "could not open config file \"%s\": %s (%d)\n",
+                   fname, strerror(errno), errno );
+#endif
                return 1;
        }
 
 #ifdef NEW_LOGGING
        LDAP_LOG(( "config", LDAP_LEVEL_ENTRY,
-                  "read_config: reading config file %s\n", fname ));
+               "read_config: reading config file %s\n", fname ));
 #else
        Debug( LDAP_DEBUG_CONFIG, "reading config file %s\n", fname, 0, 0 );
 #endif
@@ -1687,7 +1693,7 @@ read_config( const char *fname )
                                                if ( strncasecmp( cargv[i], "suffix=", 7 ) == 0 ) {
                                                        char *nsuffix = ch_strdup( cargv[i] + 7 );
                                                        if ( dn_normalize( nsuffix ) != NULL ) {
-                                                               if ( be_issuffix( be, nsuffix ) ) {
+                                                               if ( select_backend( nsuffix, 0 ) == be ) {
                                                                        charray_add( &be->be_replica[nr]->ri_nsuffix, nsuffix );
                                                                } else {
 #ifdef NEW_LOGGING
@@ -1991,13 +1997,6 @@ read_config( const char *fname )
 #endif /*SLAPD_MODULES*/
 
 #ifdef HAVE_TLS
-               } else if ( !strcasecmp( cargv[0], "TLSProtocol" ) ) {
-                       rc = ldap_pvt_tls_set_option( NULL,
-                                                     LDAP_OPT_X_TLS_PROTOCOL,
-                                                     cargv[1] );
-                       if ( rc )
-                               return rc;
-
                } else if ( !strcasecmp( cargv[0], "TLSRandFile" ) ) {
                        rc = ldap_pvt_tls_set_option( NULL,
                                                      LDAP_OPT_X_TLS_RANDOM_FILE,