[Date Prev][Date Next]
Re: Creating entries on the fly, destroying them when operation is over
Davor Ocelic wrote:
On Fri, 11 Apr 2008 23:53:04 +0200
Davor Ocelic<firstname.lastname@example.org> wrote:
In the search callback, I need to check whether an entry exists, and
if not, create it based on an another entry used as template.
Ok, got it. The last issue is:
When I've got the new entry created inside op_search handler, how do I
make it "persist" and end up returned to the client?
I've tried setting rs->sr_entry to the new entry and setting
rs->sr_err to LDAP_SUCCESS, but the entry is lost somewhere along the
way and it's not seen at overlay's exit.
The op_search handler can inspect and alter the request parameters, and do
various things based on those parameters. But to return a temporary entry that
won't be seen by the underlying backend, you have to call send_search_entry
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/