]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/config.c
add logs; fix bug in group/dn selection logic
[openldap] / servers / slapd / config.c
index d157227a8136e5e486fefeb77537730b6c22726f..dd9fb612c2afc17da6f44f82559669fade3ed2c8 100644 (file)
@@ -54,7 +54,8 @@ struct slap_limits_set deflimit = {
        0,
        -1,                             /* no limit on unchecked size */
        0,                              /* page limit */
-       0                               /* hide number of entries left */
+       0,                              /* hide number of entries left */
+       0                               /* number of total entries returned by pagedResults equal to hard limit */
 };
 
 AccessControl  *global_acl = NULL;
@@ -682,19 +683,25 @@ read_config( const char *fname, int depth )
 
                        lutil_salt_format( cargv[1] );
 
-               /* SASL config options */
-               } else if ( strncasecmp( cargv[0], "sasl", 4 ) == 0 ) {
-                       if ( slap_sasl_config( cargc, cargv, line, fname, lineno ) )
-                               return 1;
-#ifdef SLAP_X_SASL_REWRITE
+#ifdef SLAP_SASL_REWRITE
                /* use authid rewrite instead of sasl regexp */
-               } else if ( strncasecmp( cargv[0], "authid-rewrite", sizeof("authid-rewrite") - 1 ) == 0 ) {
+               } else if ( strncasecmp( cargv[0], "auth-rewrite",
+                       sizeof("auth-rewrite") - 1 ) == 0 )
+               {
                        int rc = slap_sasl_rewrite_config( fname, lineno,
                                        cargc, cargv );
                        if ( rc ) {
                                return rc;
                        }
-#endif /* SLAP_X_SASL_REWRITE */
+#endif /* SLAP_SASL_REWRITE */
+
+               /* Auth + SASL config options */
+               } else if ( !strncasecmp( cargv[0], "auth", sizeof("auth")-1 ) ||
+                       !strncasecmp( cargv[0], "sasl", sizeof("sasl")-1 ))
+               {
+                       if ( slap_sasl_config( cargc, cargv, line, fname, lineno ) )
+                               return 1;
+
 
                } else if ( strcasecmp( cargv[0], "schemadn" ) == 0 ) {
                        struct berval dn;
@@ -978,8 +985,21 @@ read_config( const char *fname, int depth )
 #endif
                                return 1;
 
-                       } else if ( overlay_config( be, cargv[1] )) {
-                               return 1;
+                       } else {
+                               if ( cargv[1][0] == '-' && overlay_config( be, &cargv[1][1] ) ) {
+                                       /* log error */
+#ifdef NEW_LOGGING
+                                       LDAP_LOG( CONFIG, INFO, "%s: line %d: "
+                                               "(optional) overlay \"%s\" configuration "
+                                               "failed (ignored)\n", fname, lineno, &cargv[1][1] );
+#else
+                                       Debug( LDAP_DEBUG_ANY, "%s: line %d: "
+                                               "(optional) overlay \"%s\" configuration "
+                                               "failed (ignored)\n", fname, lineno, &cargv[1][1] );
+#endif
+                               } else if ( overlay_config( be, cargv[1] ) ) {
+                                       return 1;
+                               }
                        }
 
                /* set database suffix */
@@ -1818,7 +1838,7 @@ read_config( const char *fname, int depth )
                                return 1;
                        }
 
-                       SLAP_DBFLAGS(be) |= SLAP_DBFLAG_SHADOW;
+                       SLAP_DBFLAGS(be) |= ( SLAP_DBFLAG_SHADOW | SLAP_DBFLAG_SYNC_SHADOW );
 
                /* list of replicas of the data in this backend (master only) */
                } else if ( strcasecmp( cargv[0], "replica" ) == 0 ) {
@@ -2058,7 +2078,7 @@ read_config( const char *fname, int depth )
                                }
 
                        }
-                       SLAP_DBFLAGS(be) |= SLAP_DBFLAG_SHADOW;
+                       SLAP_DBFLAGS(be) |= ( SLAP_DBFLAG_SHADOW | SLAP_DBFLAG_SLURP_SHADOW );
 
                } else if ( strcasecmp( cargv[0], "updateref" ) == 0 ) {
                        if ( cargc < 2 ) {