]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/config.c
Remove lint
[openldap] / servers / slapd / config.c
index 3547d7548d9e760fea32fc5e15ef3fdf0c0ed0cf..f20979649e9ef35a147ac6257fa660a805167063 100644 (file)
@@ -694,7 +694,7 @@ read_config( const char *fname )
 
                /* set size limit */
                } else if ( strcasecmp( cargv[0], "sizelimit" ) == 0 ) {
-                       int rc = 0;
+                       int rc = 0, i;
                        struct slap_limits_set *lim;
                        
                        if ( cargc < 2 ) {
@@ -717,30 +717,36 @@ read_config( const char *fname )
                                lim = &be->be_def_limit;
                        }
 
-                       if ( strncasecmp( cargv[1], "size", 4 ) == 0 ) {
-                               rc = parse_limit( cargv[1], lim );
-                       } else {
-                               lim->lms_s_soft = atoi( cargv[1] );
-                               lim->lms_s_hard = 0;
-                       }
+                       for ( i = 1; i < cargc; i++ ) {
+                               if ( strncasecmp( cargv[i], "size", 4 ) == 0 ) {
+                                       rc = parse_limit( cargv[i], lim );
+                               } else {
+                                       lim->lms_s_soft = atoi( cargv[i] );
+                                       lim->lms_s_hard = 0;
+                               }
 
-                       if ( rc ) {
+                               if ( rc ) {
 #ifdef NEW_LOGGING
-                               LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
-                                          "%s: line %d: unable to parse value"
-                                          " \"%s\" in \"sizelimit <limit>\""
-                                          " line.\n",
-                                          fname, lineno, cargv[1] ));
+                                       LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
+                                                  "%s: line %d: unable "
+                                                  "to parse value \"%s\" "
+                                                  "in \"sizelimit "
+                                                  "<limit>\" line.\n",
+                                                  fname, lineno, cargv[i] ));
 #else
-                               Debug( LDAP_DEBUG_ANY,
-           "%s: line %d: unable to parse value \"%s\" in \"sizelimit <limit>\" line\n",
-                                   fname, lineno, cargv[1] );
+                                       Debug( LDAP_DEBUG_ANY,
+                                               "%s: line %d: unable "
+                                               "to parse value \"%s\" "
+                                               "in \"sizelimit "
+                                               "<limit>\" line\n",
+                                               fname, lineno, cargv[i] );
 #endif
+                               }
                        }
 
                /* set time limit */
                } else if ( strcasecmp( cargv[0], "timelimit" ) == 0 ) {
-                       int rc = 0;
+                       int rc = 0, i;
                        struct slap_limits_set *lim;
                        
                        if ( cargc < 2 ) {
@@ -763,25 +769,31 @@ read_config( const char *fname )
                                lim = &be->be_def_limit;
                        }
 
-                       if ( strncasecmp( cargv[1], "time", 4 ) == 0 ) {
-                               rc = parse_limit( cargv[1], lim );
-                       } else {
-                               lim->lms_t_soft = atoi( cargv[1] );
-                               lim->lms_t_hard = 0;
-                       }
+                       for ( i = 1; i < cargc; i++ ) {
+                               if ( strncasecmp( cargv[i], "time", 4 ) == 0 ) {
+                                       rc = parse_limit( cargv[i], lim );
+                               } else {
+                                       lim->lms_t_soft = atoi( cargv[i] );
+                                       lim->lms_t_hard = 0;
+                               }
 
-                       if ( rc ) {
+                               if ( rc ) {
 #ifdef NEW_LOGGING
-                               LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
-                                          "%s: line %d: unable to parse value"
-                                          " \"%s\" in \"timelimit <limit>\""
-                                          " line.\n",
-                                          fname, lineno, cargv[1] ));
+                                       LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
+                                                  "%s: line %d: unable "
+                                                  "to parse value \"%s\" "
+                                                  "in \"timelimit "
+                                                  "<limit>\" line.\n",
+                                                  fname, lineno, cargv[i] ));
 #else
-                               Debug( LDAP_DEBUG_ANY,
-           "%s: line %d: unable to parse value \"%s\" in \"timelimit <limit>\" line\n",
-                                   fname, lineno, cargv[1] );
+                                       Debug( LDAP_DEBUG_ANY,
+                                               "%s: line %d: unable "
+                                               "to parse value \"%s\" "
+                                               "in \"timelimit "
+                                               "<limit>\" line\n",
+                                               fname, lineno, cargv[i] );
 #endif
+                               }
                        }
 
                /* set regex-based limits */
@@ -1675,7 +1687,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
@@ -1979,13 +1991,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,