[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: checking for bound user



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.

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. 

The whole overlay technology is extremely cool, and being able to specify multiple overlays on a given backend provides a lot of flexibility.

- DAP

> -----Original Message-----
> From: Howard Chu [mailto:hyc@highlandsun.com]
> Sent: Thursday, April 08, 2004 10:06 PM
> To: David Parker; openldap-devel@OpenLDAP.org
> Subject: RE: checking for bound user
> 
> 
> 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 
> 
> > -----Original Message-----
> > From: owner-openldap-devel@OpenLDAP.org
> > [mailto:owner-openldap-devel@OpenLDAP.org]On Behalf Of David Parker
> > Sent: Thursday, April 08, 2004 6:15 PM
> > To: openldap-devel@OpenLDAP.org
> > Subject: RE: checking for bound user
> > 
> > 
> > That's a big help. Thanks for the code!
> > 
> > - DAP
> > 
> > > -----Original Message-----
> > > From: Howard Chu [mailto:hyc@highlandsun.com]
> > > Sent: Thursday, April 08, 2004 9:08 PM
> > > To: David Parker; openldap-devel@OpenLDAP.org
> > > Subject: RE: checking for bound user
> > > 
> > > 
> > > OK. You'll need to scan through with something like this:
> > 
>