The name of the attributeDescription that will list the DN of the entries
resulting from the internal search. This statement is optional and, if
present, changes the behavior of the overlay into that of a dynamic group.
-The <attrs> portion of the URI is ignored, and the DNs of all the entries
+The <attrs> portion of the URI must be absent, and the DNs of all the entries
resulting from the expansion of the URI are listed as values of this
attribute.
-
+Compares to
+.B dynlist-member-ad
+attributes of entries with
+.B dynlist-oc
+objectClass apply as if the DN of the entries resulting from the expansion
+of the URI were present in the
+.B dynlist-oc
+entry as values of the
+.B dynlist-member-ad
+attributeType.
.LP
The dynlist overlay may be used with any backend, but it is mainly
intended for use with local storage backends.
int rc;
dynlist_sc_t dlc = { 0 };
+ if ( op->oq_compare.rs_ava->aa_desc == dli->dli_member_ad ) {
+ /* This compare is for one of the attributes we're
+ * interested in. We'll use slapd's existing dyngroup
+ * evaluator to get the answer we want.
+ */
+ int cache = op->o_do_not_cache;
+
+ op->o_do_not_cache = 1;
+ rs->sr_err = backend_group( op, NULL, &op->o_req_ndn,
+ &op->oq_compare.rs_ava->aa_value, dli->dli_oc, dli->dli_ad );
+ op->o_do_not_cache = cache;
+ if ( rs->sr_err == LDAP_SUCCESS ) {
+ rs->sr_err = LDAP_COMPARE_TRUE;
+ }
+
+ return SLAP_CB_CONTINUE;
+ }
+
dlc.dlc_dli = dli;
cb.sc_private = &dlc;
cb.sc_response = dynlist_sc_save_entry;
echo "Testing list compare..."
echo "# Testing list compare..." >> $SEARCHOUT
$LDAPCOMPARE -h $LOCALHOST -p $PORT1 \
- "cn=Dynamic List,$LISTDN" "member:$CMPDN" \
+ "cn=Dynamic List of Members,$LISTDN" "member:$CMPDN" \
>> $SEARCHOUT 2>&1
RC=$?
case $RC in