From: Pierangelo Masarati Date: Wed, 8 Aug 2007 18:23:22 +0000 (+0000) Subject: syncrepl searchbase must be within the database naming context (ITS#5073) X-Git-Tag: OPENLDAP_REL_ENG_2_4_MP~251 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=caf89557abb956ed26e406cb5340b409fddc22b8;p=openldap syncrepl searchbase must be within the database naming context (ITS#5073) --- diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index e9344eabd9..289464fd4f 100644 --- a/servers/slapd/syncrepl.c +++ b/servers/slapd/syncrepl.c @@ -3351,6 +3351,14 @@ parse_syncrepl_line( Debug( LDAP_DEBUG_ANY, "%s: %s.\n", c->log, c->cr_msg, 0 ); return -1; } + if ( select_backend( &si->si_base, 0 ) != c->be ) { + ber_memfree( si->si_base.bv_val ); + snprintf( c->cr_msg, sizeof( c->cr_msg ), + "Base DN \"%s\" is not within the database naming context", + val ); + Debug( LDAP_DEBUG_ANY, "%s: %s.\n", c->log, c->cr_msg, 0 ); + return -1; + } gots |= GOT_BASE; } else if ( !strncasecmp( c->argv[ i ], LOGBASESTR "=", STRLENOF( LOGBASESTR "=" ) ) )