On Fri, Nov 28, 2025 at 05:25:14PM +0000, Emmanuel Dreyfus wrote: > Hello > > I am working on a slapd overlay where I need to perform an internal > search to validate a modify operation. It is roughtly the same situation > as slapo-constraint with an url constraint type. > > In .bi_op_modify(), I piggy back on Operation with the code below. It > works, my callback gets the entry, but when op2.o_bd->be_search() is > called, the ldapmodify command gets this: > ldap_modify: msgtype: expected 103 got 101 > > That is, LDAP_RES_SEARCH_RESULT instead of LDAP_RES_MODIFY: the search is > not just insternal, its results are sent to the client. > > What did I do wrong?
Hi Emmanuel, our client sent a Modify request, you can't send a Search result back, which is what your client is complaining about, if you defined your own control and want to send additional data to the client, either define an Intermediate response or provide this data in the Modify response control. To do that, change your response callback (supann_internal_search_cb) to suppress this response from being sent back to the client - just return LDAP_SUCCESS instead of SLAP_CB_CONTINUE in that case which lets the response progress further up the stack. Plenty of overlays do this, so should be able to find this now that you know what you're looking for. Regards, -- Ondřej Kuzník Senior Software Engineer Symas Corporation http://www.symas.com Packaged, certified, and supported LDAP solutions powered by OpenLDAP
