From: Ondřej Kuzník Date: Tue, 29 Oct 2024 12:43:37 +0000 (+0000) Subject: ITS#10272 Request all attributes from remote X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=64021967b551b9ce6c192d899883ba8be046be7e;p=thirdparty%2Fopenldap.git 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. --- diff --git a/servers/slapd/overlays/translucent.c b/servers/slapd/overlays/translucent.c index e5f7384aa2..ea4043257b 100644 --- a/servers/slapd/overlays/translucent.c +++ b/servers/slapd/overlays/translucent.c @@ -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; diff --git a/tests/scripts/test034-translucent b/tests/scripts/test034-translucent index ef9dbff6c3..839dee7d0d 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"