]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/syncrepl.c
don't return entry if requested attr is not present (ITS#5650)
[openldap] / servers / slapd / syncrepl.c
index 7c08cb07dfbd3d190aff975031fe988c25c18ed2..4378ee9383d7880e95108fbb13a01329d1c40af3 100644 (file)
@@ -579,6 +579,9 @@ do_syncrep1(
 
        ldap_set_option( si->si_ld, LDAP_OPT_TIMELIMIT, &si->si_tlimit );
 
+       rc = LDAP_DEREF_NEVER;  /* actually could allow DEREF_FINDING */
+       ldap_set_option( si->si_ld, LDAP_OPT_DEREF, &rc );
+
        si->si_syncCookie.rid = si->si_rid;
 
        /* whenever there are multiple data sources possible, advertise sid */
@@ -911,6 +914,11 @@ do_syncrep2(
                                rc = err;
                                goto done;
                        }
+                       if ( err ) {
+                               Debug( LDAP_DEBUG_ANY,
+                                       "do_syncrep2: %s LDAP_RES_SEARCH_RESULT (%d) %s\n",
+                                       si->si_ridtxt, err, ldap_err2string( err ) );
+                       }
                        if ( rctrls ) {
                                rctrlp = *rctrls;
                                ber_init2( ber, &rctrlp->ldctl_value, LBER_USE_DER );