]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/config.c
switch to openldap-data directory
[openldap] / servers / slapd / config.c
index 93a9934344dd21e6a82a9817c35da4e66d3a1856..4056bad667458bc5facfa1c5c33527d7dd498499 100644 (file)
@@ -40,7 +40,6 @@ slap_mask_t           global_disallows = 0;
 slap_mask_t            global_requires = 0;
 slap_ssf_set_t global_ssf_set;
 char           *replogfile;
-int            global_lastmod = ON;
 int            global_idletimeout = 0;
 char   *global_host = NULL;
 char   *global_realm = NULL;
@@ -78,6 +77,7 @@ read_config( const char *fname )
        int rc;
        struct berval vals[2];
 
+       static int lastmod = 1;
        static BackendInfo *bi = NULL;
        static BackendDB        *be = NULL;
 
@@ -842,7 +842,7 @@ read_config( const char *fname )
                                    fname, lineno, 0 );
 #endif
                        } else {
-                               be->be_glueflags |= SLAP_GLUE_SUBORDINATE;
+                               be->be_flags |= SLAP_BFLAG_GLUE_SUBORDINATE;
                                num_subordinates++;
                        }
 
@@ -1993,15 +1993,17 @@ read_config( const char *fname )
                                return( 1 );
                        }
                        if ( strcasecmp( cargv[1], "on" ) == 0 ) {
-                               if ( be )
-                                       be->be_lastmod = ON;
-                               else
-                                       global_lastmod = ON;
+                               if ( be ) {
+                                       be->be_flags &= ~SLAP_BFLAG_NOLASTMOD;
+                               } else {
+                                       lastmod = 1;
+                               }
                        } else {
-                               if ( be )
-                                       be->be_lastmod = OFF;
-                               else
-                                       global_lastmod = OFF;
+                               if ( be ) {
+                                       be->be_flags |= SLAP_BFLAG_NOLASTMOD;
+                               } else {
+                                       lastmod = 0;
+                               }
                        }
 
                /* set idle timeout value */
@@ -2183,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;
 
@@ -2375,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)++;