]> git.sur5r.net Git - openldap/commitdiff
searchbase is a required config parameter, log missing params.
authorHoward Chu <hyc@openldap.org>
Sat, 29 Apr 2006 09:24:14 +0000 (09:24 +0000)
committerHoward Chu <hyc@openldap.org>
Sat, 29 Apr 2006 09:24:14 +0000 (09:24 +0000)
servers/slapd/syncrepl.c

index bf2f436b1af980f76f197a5319e0c051540b6ab4..3afb4e8c1502e4c4f2a63f3031b0a1a65f0d2e7c 100644 (file)
@@ -2757,10 +2757,11 @@ syncinfo_free( syncinfo_t *sie )
 
 /* mandatory */
 #define GOT_ID                 0x0001
-#define GOT_PROVIDER           0x0002
+#define GOT_PROVIDER   0x0002
+#define        GOT_BASE                0x0004
 
 /* check */
-#define GOT_ALL                        (GOT_ID|GOT_PROVIDER)
+#define GOT_ALL                        (GOT_ID|GOT_PROVIDER|GOT_BASE)
 
 static struct {
        struct berval key;
@@ -2866,6 +2867,7 @@ parse_syncrepl_line(
                                Debug( LDAP_DEBUG_ANY, "%s: %s.\n", c->log, c->msg, 0 );
                                return -1;
                        }
+                       gots |= GOT_BASE;
                } else if ( !strncasecmp( c->argv[ i ], LOGBASESTR "=",
                                        STRLENOF( LOGBASESTR "=" ) ) )
                {
@@ -3182,7 +3184,10 @@ parse_syncrepl_line(
 
        if ( gots != GOT_ALL ) {
                snprintf( c->msg, sizeof( c->msg ),
-                       "Error: Malformed \"syncrepl\" line in slapd config file" );
+                       "Error: Malformed \"syncrepl\" line in slapd config file, missing%s%s%s",
+                       gots & GOT_ID ? "" : " "IDSTR,
+                       gots & GOT_PROVIDER ? "" : " "PROVIDERSTR,
+                       gots & GOT_BASE ? "" : " "SEARCHBASESTR );
                Debug( LDAP_DEBUG_ANY, "%s: %s.\n", c->log, c->msg, 0 );
                return -1;
        }