[Date Prev][Date Next]
Trouble with Bind/overlays/callbacks
- To: OpenLDAP Devel <firstname.lastname@example.org>
- Subject: Trouble with Bind/overlays/callbacks
- From: Howard Chu <email@example.com>
- Date: Mon, 17 Sep 2007 21:49:22 -0700
- User-agent: Mozilla/5.0 (X11; U; Linux i686; rv:1.9a8pre) Gecko/2007091708 SeaMonkey/2.0a1pre
In slapd just about all of the operation handlers send their results from the
backend directly to the client. The notable exception is for the Bind
operation, which sends failures directly to the client, but has to return
successes to the frontend to allow final processing to occur there. This
difference causes a fair bit of complexity when writing Bind handlers in
backends and overlays.
In 2.3 we ran into other sequencing issues that could only be solved by moving
some of the Bind cleanup into a callback (connection_bind_cb). We have an
opportunity now to move all of the postprocessing into that callback, allowing
us to remove all special case handling of Binds in the backends and overlays.
Of course, making this change will touch every backend that handles Bind
operations. It may impact overlays that intercept Binds as well.
In particular, overlays that insert response callbacks on Bind operations can
potentially break in the current code. I.e., if an overlay inserts a callback
at the head of the stack (instead of at the end) then currently it will simply
not get called in the case of a successful Bind, because the overlay framework
tears down the callback stack before it returns to the frontend. If the
callback was inserted using malloc'd memory then it will cause a memory leak
I plan to file an ITS on this for RE24, not sure how soon I'll get to the
actual changes though.
-- Howard Chu
Chief Architect, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/