}
- if ( len && len < dnlen && !DN_SEPARATOR( dn[(dnlen-len)-1] ) ) {
+ if ( len && len < dnlen && ( !DN_SEPARATOR( dn[(dnlen-len)-1] ) || DN_ESCAPE( dn[(dnlen-len)-2] ) ) ) {
/* make sure we have a separator */
continue;
}
return(rc);
}
+int
+be_isupdate( Backend *be, const char *ndn )
+{
+ int rc;
+
+ if ( ndn == NULL || *ndn == '\0' ) {
+ return( 0 );
+ }
+
+ if ( be->be_update_ndn == NULL || *be->be_update_ndn == '\0' ) {
+ return( 0 );
+ }
+
+ rc = strcmp( be->be_update_ndn, ndn ) ? 0 : 1;
+
+ return(rc);
+}
+
char *
be_root_dn( Backend *be )
{
if (i)
return SLAPD_ABANDON;
+ if( strcmp( target->e_ndn, gr_ndn ) != 0 ) {
+ /* we won't attempt to send it to a different backend */
+
+ be = select_backend(gr_ndn, 0);
+
+ if (be == NULL) {
+ return LDAP_NO_SUCH_OBJECT;
+ }
+ }
+
ldap_pvt_thread_mutex_lock( &conn->c_mutex );
for (g = conn->c_groups; g; g=g->next) {
if (g->be != be || g->oc != group_oc || g->at != group_at ||
if (g)
return g->res;
- if( strcmp( target->e_ndn, gr_ndn ) != 0 ) {
- /* we won't attempt to send it to a different backend */
-
- be = select_backend(gr_ndn, 0);
-
- if (be == NULL) {
- return LDAP_NO_SUCH_OBJECT;
- }
- }
-
if( be->be_group ) {
int res = be->be_group( be, conn, op,
target, gr_ndn, op_ndn,