[Pkg-openldap-devel] r1159 - in openldap/trunk/debian: . patches
vorlon at alioth.debian.org
vorlon at alioth.debian.org
Mon Jun 30 09:16:03 UTC 2008
Author: vorlon
Date: 2008-06-30 09:16:03 +0000 (Mon, 30 Jun 2008)
New Revision: 1159
Added:
openldap/trunk/debian/patches/no_backend_inter-linking
Modified:
openldap/trunk/debian/changelog
openldap/trunk/debian/patches/series
Log:
New patch, no_backend_inter-linking, to fix the meta backend to not
try to look up symbols in external objects (back_ldap) that it
doesn't link against.
Modified: openldap/trunk/debian/changelog
===================================================================
--- openldap/trunk/debian/changelog 2008-06-29 22:43:56 UTC (rev 1158)
+++ openldap/trunk/debian/changelog 2008-06-30 09:16:03 UTC (rev 1159)
@@ -11,6 +11,9 @@
* Use hardlinks instead of symlinks for the various slap* commands; this
is functionally equivalent for us, and reduces divergence from
derivatives such as Ubuntu that use apparmor. Closes: #488409.
+ * New patch, no_backend_inter-linking, to fix the meta backend to not
+ try to look up symbols in external objects (back_ldap) that it
+ doesn't link against.
[ Matthijs Mohlmann ]
* All manpages in category 5 were missing, wrong directory.
Added: openldap/trunk/debian/patches/no_backend_inter-linking
===================================================================
--- openldap/trunk/debian/patches/no_backend_inter-linking (rev 0)
+++ openldap/trunk/debian/patches/no_backend_inter-linking 2008-06-30 09:16:03 UTC (rev 1159)
@@ -0,0 +1,180 @@
+Patch from upstream CVS
+
+back-meta shouldn't need to link against back-ldap; fix up the
+ldap_extra_t struct so that all the functions back-meta needs access to
+are here, so it doesn't fail with Debian libltdl.
+
+Addresses ITS#5355.
+
+Index: servers/slapd/back-meta/config.c
+===================================================================
+--- servers/slapd/back-meta/config.c.orig
++++ servers/slapd/back-meta/config.c
+@@ -1089,7 +1089,7 @@
+ }
+ 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 @@
+ 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 @@
+ 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 @@
+ 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 );
+Index: servers/slapd/back-meta/init.c
+===================================================================
+--- servers/slapd/back-meta/init.c.orig
++++ servers/slapd/back-meta/init.c
+@@ -93,6 +93,15 @@
+ {
+ metainfo_t *mi;
+ int i;
++ BackendInfo *bi;
++
++ bi = backend_info( "ldap" );
++ if ( !bi || !bi->bi_extra ) {
++ Debug( LDAP_DEBUG_ANY,
++ "meta_back_db_init: needs back-ldap\n",
++ 0, 0, 0 );
++ return 1;
++ }
+
+ mi = ch_calloc( 1, sizeof( metainfo_t ) );
+ if ( mi == NULL ) {
+@@ -127,6 +136,8 @@
+ }
+ mi->mi_conn_priv_max = LDAP_BACK_CONN_PRIV_DEFAULT;
+
++ mi->mi_ldap_extra = (ldap_extra_t *)bi->bi_extra;
++
+ be->be_private = mi;
+
+ return 0;
+@@ -138,7 +149,6 @@
+ ConfigReply *cr )
+ {
+ metainfo_t *mi = (metainfo_t *)be->be_private;
+- BackendInfo *bi;
+
+ int i,
+ not_always = 0,
+@@ -153,15 +163,6 @@
+ return 1;
+ }
+
+- bi = backend_info( "ldap" );
+- if ( !bi || !bi->bi_extra ) {
+- Debug( LDAP_DEBUG_ANY,
+- "meta_back_db_open: needs back-ldap\n",
+- 0, 0, 0 );
+- return 1;
+- }
+- mi->mi_ldap_extra = (ldap_extra_t *)bi->bi_extra;
+-
+ for ( i = 0; i < mi->mi_ntargets; i++ ) {
+ slap_bindconf sb = { BER_BVNULL };
+ metatarget_t *mt = mi->mi_targets[ i ];
+@@ -383,7 +384,7 @@
+ 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 +412,7 @@
+ }
+
+ if ( META_BACK_QUARANTINE( mi ) ) {
+- slap_retry_info_destroy( &mi->mi_quarantine );
++ mi->mi_ldap_extra->retry_info_destroy( &mi->mi_quarantine );
+ }
+ }
+
+Index: servers/slapd/back-ldap/back-ldap.h
+===================================================================
+--- servers/slapd/back-ldap/back-ldap.h.orig
++++ servers/slapd/back-ldap/back-ldap.h
+@@ -428,6 +428,11 @@
+ 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
+Index: servers/slapd/back-ldap/init.c
+===================================================================
+--- servers/slapd/back-ldap/init.c.orig
++++ 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
+Index: servers/slapd/back-ldap/proto-ldap.h
+===================================================================
+--- servers/slapd/back-ldap/proto-ldap.h.orig
++++ servers/slapd/back-ldap/proto-ldap.h
+@@ -63,22 +63,6 @@
+
+ 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,
Modified: openldap/trunk/debian/patches/series
===================================================================
--- openldap/trunk/debian/patches/series 2008-06-29 22:43:56 UTC (rev 1158)
+++ openldap/trunk/debian/patches/series 2008-06-30 09:16:03 UTC (rev 1159)
@@ -9,3 +9,4 @@
libldap-symbol-versions
gnutls-ciphers
getaddrinfo-is-threadsafe
+no_backend_inter-linking -p0
More information about the Pkg-openldap-devel
mailing list