]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#10272 Request all attributes from remote
authorOndřej Kuzník <ondra@mistotebe.net>
Tue, 29 Oct 2024 12:43:37 +0000 (12:43 +0000)
committerOndřej Kuzník <ondra@mistotebe.net>
Tue, 29 Oct 2024 12:43:37 +0000 (12:43 +0000)
Fixes a regression introduced in fc1bcaf9ded9410cd825112be8db994163c06b04
leaving us unable to check the full filter after we recreate the entry.

servers/slapd/overlays/translucent.c
tests/scripts/test034-translucent

index e5f7384aa217de0feac8d4f24e36c76ba492ede0..ea4043257b4be4d459736b45932c13ed081971b5 100644 (file)
@@ -1175,6 +1175,7 @@ static int translucent_search(Operation *op, SlapReply *rs) {
                op2.o_hdr = &oh;
                op2.o_extra = op->o_extra;
                op2.o_callback = &cb;
+               op2.ors_attrs = slap_anlist_all_attributes;
 
                tc.attrs = op->ors_attrs;
                op->ors_slimit = SLAP_NO_LIMIT;
index ef9dbff6c3d78678f67df508a7264f76cc56ded2..839dee7d0d02b6977cbf2ba92c2aa264456edb71 100755 (executable)
@@ -798,6 +798,16 @@ if test -z "$ATTR" ; then
        exit 1
 fi
 
+echo "Testing search: configured remote filter not requesting filtered attrs..."
+$LDAPSEARCH -H $URI2 -b "o=translucent" "(|(employeeType=foo)(carlicense=right))" cn > $SEARCHOUT 2>&1
+
+ATTR=`grep dn: $SEARCHOUT` > $NOWHERE 2>&1
+if test -z "$ATTR" ; then
+       echo "got no result, should have found entry"
+       test $KILLSERVERS != no && kill -HUP $KILLPIDS
+       exit 1
+fi
+
 test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"