From 3b9d4bc43381fbca51c8920b7bfd229c282cc9f4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ond=C5=99ej=20Kuzn=C3=ADk?= Date: Tue, 29 Oct 2024 12:43:37 +0000 Subject: [PATCH] ITS#10272 Request all attributes from remote Fixes a regression introduced in fc1bcaf9ded9410cd825112be8db994163c06b04 leaving us unable to check the full filter after we recreate the entry. --- servers/slapd/overlays/translucent.c | 1 + tests/scripts/test034-translucent | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/servers/slapd/overlays/translucent.c b/servers/slapd/overlays/translucent.c index 18fea165c8..a0dd6ef84d 100644 --- a/servers/slapd/overlays/translucent.c +++ b/servers/slapd/overlays/translucent.c @@ -1174,6 +1174,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; diff --git a/tests/scripts/test034-translucent b/tests/scripts/test034-translucent index 6b00908202..b640da056f 100755 --- a/tests/scripts/test034-translucent +++ b/tests/scripts/test034-translucent @@ -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" -- 2.47.2