int (*proxy_authz_ctrl)( Operation *op, SlapReply *rs, struct berval *bound_ndn,
int version, slap_idassert_t *si, LDAPControl *ctrl );
int (*controls_free)( Operation *op, SlapReply *rs, LDAPControl ***pctrls );
+ int (*idassert_authzfrom_parse_cf)( const char *fname, int lineno, const char *arg, slap_idassert_t *si );
+ int (*idassert_parse_cf)( const char *fname, int lineno, int argc, char *argv[], slap_idassert_t *si );
+ void (*retry_info_destroy)( slap_retry_info_t *ri );
+ int (*retry_info_parse)( char *in, slap_retry_info_t *ri, char *buf, ber_len_t buflen );
+ int (*retry_info_unparse)( slap_retry_info_t *ri, struct berval *bvout );
} ldap_extra_t;
LDAP_END_DECL
static const ldap_extra_t ldap_extra = {
ldap_back_proxy_authz_ctrl,
- ldap_back_controls_free
+ ldap_back_controls_free,
+ slap_idassert_authzfrom_parse_cf,
+ slap_idassert_parse_cf,
+ slap_retry_info_destroy,
+ slap_retry_info_parse,
+ slap_retry_info_unparse
};
int
extern ldapconn_t * ldap_back_conn_delete( ldapinfo_t *li, ldapconn_t *lc );
-#if 0
-extern int
-ldap_back_proxy_authz_ctrl(
- struct berval *bound_ndn,
- int version,
- slap_idassert_t *si,
- Operation *op,
- SlapReply *rs,
- LDAPControl ***pctrls );
-
-extern int
-ldap_back_proxy_authz_ctrl_free(
- Operation *op,
- LDAPControl ***pctrls );
-#endif
-
extern int
ldap_back_proxy_authz_ctrl(
Operation *op,
}
cargv[ 2 ] = binddn;
- rc = slap_idassert_parse_cf( fname, lineno, cargc, cargv, &mi->mi_targets[ mi->mi_ntargets - 1 ]->mt_idassert );
+ rc = mi->mi_ldap_extra->idassert_parse_cf( fname, lineno, cargc, cargv, &mi->mi_targets[ mi->mi_ntargets - 1 ]->mt_idassert );
if ( rc == 0 ) {
struct berval bv;
return 1;
}
- return slap_idassert_parse_cf( fname, lineno, argc, argv, &mi->mi_targets[ mi->mi_ntargets - 1 ]->mt_idassert );
+ return mi->mi_ldap_extra->idassert_parse_cf( fname, lineno, argc, argv, &mi->mi_targets[ mi->mi_ntargets - 1 ]->mt_idassert );
/* idassert-authzFrom */
} else if ( strcasecmp( argv[ 0 ], "idassert-authzFrom" ) == 0 ) {
return 1;
}
- return slap_idassert_authzfrom_parse_cf( fname, lineno, argv[ 1 ], &mi->mi_targets[ mi->mi_ntargets - 1 ]->mt_idassert );
+ return mi->mi_ldap_extra->idassert_authzfrom_parse_cf( fname, lineno, argv[ 1 ], &mi->mi_targets[ mi->mi_ntargets - 1 ]->mt_idassert );
/* quarantine */
} else if ( strcasecmp( argv[ 0 ], "quarantine" ) == 0 ) {
ldap_pvt_thread_mutex_init( &mi->mi_targets[ mi->mi_ntargets - 1 ]->mt_quarantine_mutex );
}
- if ( slap_retry_info_parse( argv[ 1 ], ri, buf, sizeof( buf ) ) ) {
+ if ( mi->mi_ldap_extra->retry_info_parse( argv[ 1 ], ri, buf, sizeof( buf ) ) ) {
Debug( LDAP_DEBUG_ANY,
"%s line %d: %s.\n",
fname, lineno, buf );
if ( META_BACK_TGT_QUARANTINE( mt ) ) {
if ( mt->mt_quarantine.ri_num != mi->mi_quarantine.ri_num )
{
- slap_retry_info_destroy( &mt->mt_quarantine );
+ mi->mi_ldap_extra->retry_info_destroy( &mt->mt_quarantine );
}
ldap_pvt_thread_mutex_destroy( &mt->mt_quarantine_mutex );
}
if ( META_BACK_QUARANTINE( mi ) ) {
- slap_retry_info_destroy( &mi->mi_quarantine );
+ mi->mi_ldap_extra->retry_info_destroy( &mi->mi_quarantine );
}
}