From: Howard Chu Date: Sun, 29 Jun 2008 21:13:03 +0000 (+0000) Subject: More symbols for ITS#5355 X-Git-Tag: LOCKER_IDS~82 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=010295e9e74727fb68ea930fd4afdb9efbf3377f;p=openldap More symbols for ITS#5355 --- diff --git a/servers/slapd/back-ldap/back-ldap.h b/servers/slapd/back-ldap/back-ldap.h index 9098d40841..81a42501f0 100644 --- a/servers/slapd/back-ldap/back-ldap.h +++ b/servers/slapd/back-ldap/back-ldap.h @@ -428,6 +428,11 @@ typedef struct ldap_extra_t { 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 diff --git a/servers/slapd/back-ldap/init.c b/servers/slapd/back-ldap/init.c index 44012c81b7..fa32fd47f4 100644 --- a/servers/slapd/back-ldap/init.c +++ b/servers/slapd/back-ldap/init.c @@ -34,7 +34,12 @@ 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 diff --git a/servers/slapd/back-ldap/proto-ldap.h b/servers/slapd/back-ldap/proto-ldap.h index 933c9484cc..e2f98e5b15 100644 --- a/servers/slapd/back-ldap/proto-ldap.h +++ b/servers/slapd/back-ldap/proto-ldap.h @@ -63,22 +63,6 @@ extern void ldap_back_conn_free( void *c ); 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, diff --git a/servers/slapd/back-meta/config.c b/servers/slapd/back-meta/config.c index 2d87c78c32..1c02ccc248 100644 --- a/servers/slapd/back-meta/config.c +++ b/servers/slapd/back-meta/config.c @@ -1089,7 +1089,7 @@ idassert-authzFrom "dn:" } 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; @@ -1159,7 +1159,7 @@ idassert-authzFrom "dn:" 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 ) { @@ -1188,7 +1188,7 @@ idassert-authzFrom "dn:" 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 ) { @@ -1232,7 +1232,7 @@ idassert-authzFrom "dn:" 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 ); diff --git a/servers/slapd/back-meta/init.c b/servers/slapd/back-meta/init.c index cd98c4738d..0fe162ca35 100644 --- a/servers/slapd/back-meta/init.c +++ b/servers/slapd/back-meta/init.c @@ -383,7 +383,7 @@ meta_back_db_destroy( 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 ); @@ -411,7 +411,7 @@ meta_back_db_destroy( } if ( META_BACK_QUARANTINE( mi ) ) { - slap_retry_info_destroy( &mi->mi_quarantine ); + mi->mi_ldap_extra->retry_info_destroy( &mi->mi_quarantine ); } }