> -----Original Message----- > From: owner-openldap-devel@OpenLDAP.org > [mailto:owner-openldap-devel@OpenLDAP.org]On Behalf Of David Parker > Actually, our design has changed a bit since I first posted > the question. We have a variety of components we want to > implement as overlays, and we want to be able to mix and > match them depending on the requirements of a given site. That's fine. > So I think I really need to be able to check for the > c_authz_backend by name, rather than comparing the pointer to > my current, because I want to have a single overlay that does > bind logic, with other overlays that support their peculiar > features just checking to see if their master bind overlay > performed the bind of the requesting user or not. If all of your overlays are stacked on a single backend, then the code snippet below is sufficient. (Remember that on->on_info points to the overlay info for the entire backend, not just a particular overlay instance.) If you're saying you want a single Bind overlay that is pushed onto several different backends, then you may need to walk through the list as I illustrated the first time around and compare the overlay names. > The whole overlay technology is extremely cool, and being > able to specify multiple overlays on a given backend provides > a lot of flexibility. Yes... By the way, have you looked at overlays/slapover.txt in CVS HEAD, and did it tell you anything useful? > - DAP > > > -----Original Message----- > > From: Howard Chu [mailto:hyc@highlandsun.com] > > Actually it's a lot simpler than that: > > > > slap_overinst *on = (slap_overinst *)op->o_bd->bd_info; > > > > if (!op->o_conn->c_authz_backend || > > op->o_conn->c_authz_backend->bd_info != > > (BackendInfo *)on->on_info) { > > /* Not ours */ > > return -1; > > } -- Howard Chu Chief Architect, Symas Corp. Director, Highland Sun http://www.symas.com http://highlandsun.com/hyc Symas: Premier OpenSource Development and Support
<<attachment: winmail.dat>>