]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/config.c
add Time subsystem
[openldap] / servers / slapd / config.c
index eb3efa04aa98d9246f3a996d053349d54ceec276..4056bad667458bc5facfa1c5c33527d7dd498499 100644 (file)
@@ -2185,10 +2185,17 @@ read_config( const char *fname )
                        if ( rc )
                                return rc;
                } else if ( !strcasecmp( cargv[0], "TLSVerifyClient" ) ) {
-                       i = atoi(cargv[1]);
-                       rc = ldap_pvt_tls_set_option( NULL,
+                       if ( isdigit( cargv[1][0] ) ) {
+                               i = atoi(cargv[1]);
+                               rc = ldap_pvt_tls_set_option( NULL,
                                                      LDAP_OPT_X_TLS_REQUIRE_CERT,
                                                      &i );
+                       } else {
+                               rc = ldap_int_tls_config( NULL,
+                                                     LDAP_OPT_X_TLS_REQUIRE_CERT,
+                                                     cargv[1] );
+                       }
+
                        if ( rc )
                                return rc;
 
@@ -2377,12 +2384,22 @@ fp_getline( FILE *fp, int *lineno )
                        if( p > buf && p[-1] == '\r' ) --p;
                        *p = '\0';
                }
-               if ( ! isspace( (unsigned char) buf[0] ) ) {
-                       return( line );
-               }
+               
+               /* trim off trailing \ and append the next line */
+               if ( line[ 0 ] != '\0' 
+                               && (p = line + strlen( line ) - 1)[ 0 ] == '\\'
+                               && p[ -1 ] != '\\' ) {
+                       p[ 0 ] = '\0';
+                       lcur--;
 
-               /* change leading whitespace to a space */
-               buf[0] = ' ';
+               } else {
+                       if ( ! isspace( (unsigned char) buf[0] ) ) {
+                               return( line );
+                       }
+
+                       /* change leading whitespace to a space */
+                       buf[0] = ' ';
+               }
 
                CATLINE( buf );
                (*lineno)++;