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

overlay question



Hi!

I've gotten a bit further towards adding a access control overlay that uses our authorization server Spocp.

I have something sort of work.

First I've been working against 2.2.14.

Now, my problem is that my overlay is not called when I think it should have been.

I have the following definitions of when functions should be called:

--------------------------------------------------------------------
int
spocp_init( void )
{

	Debug( LDAP_DEBUG_ANY,"Starting spocp_init()\n", 0,0,0);

        memset( &spocp_oi, 0, sizeof( slap_overinst ) );
        spocp_oi.on_bi.bi_type = "spocp";
        spocp_oi.on_bi.bi_db_init = spocp_over_init;
        spocp_oi.on_bi.bi_db_config = spocp_config;
        spocp_oi.on_bi.bi_db_destroy = spocp_destroy;
        spocp_oi.on_bi.bi_db_open = spocp_open;
        spocp_oi.on_bi.bi_db_close = spocp_close;

        spocp_oi.on_bi.bi_op_search = spocp_cntrl_op;
        spocp_oi.on_bi.bi_op_compare = spocp_cntrl_op;
        spocp_oi.on_bi.bi_op_modify = spocp_cntrl_op;
        spocp_oi.on_bi.bi_op_modrdn = spocp_cntrl_op;
        spocp_oi.on_bi.bi_op_add = spocp_cntrl_op;
        spocp_oi.on_bi.bi_op_delete = spocp_cntrl_op;
        spocp_oi.on_bi.bi_extended = spocp_cntrl_op;
        spocp_oi.on_bi.bi_op_unbind = spocp_cntrl_op;
        spocp_oi.on_bi.bi_op_bind = spocp_cntrl_op;

        spocp_oi.on_response = spocp_response /* spocp_response */ ;

	Debug( LDAP_DEBUG_ANY,"spocp_init: done registring\n", 0,0,0);

        return overlay_register( &spocp_oi );
}

#if SLAPD_OVER_SPOCP == SLAPD_MOD_DYNAMIC
int
init_module( int argc, char *argv[] )
{
        return spocp_init();
}
#endif /* SLAPD_OVER_SPOCP == SLAPD_MOD_DYNAMIC */
--------------------------------------------------------------------

And the result is that spocp_cntrl_op() is called on unbind but not on bind or search (which is the ones I have checked) operations.

Why is that ?

-- Roland