From: Sam Hartman Date: Sun, 29 Jan 2006 21:14:03 +0000 (+0000) Subject: * Fix prototype of db2 library initializer to work with changes introduced in error... X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fheads%2Fhartmans%2Fldap-integ;p=thirdparty%2Fkrb5.git * Fix prototype of db2 library initializer to work with changes introduced in error handling patch. * Remove thread safety flag from the LDAP plugin vftable * Work around LDAP_X_ERROR not being in all version of OpenLDAP * Work around older OpenLDAP using ldap_opt_error_number not ldap_opt_result_code * Source is in SRCTOP not BUILDTOP; kadmin/server got this wrong. * Document more blocking bugs git-svn-id: svn://anonsvn.mit.edu/krb5/users/hartmans/ldap-integ@17633 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/blocking-bugs b/blocking-bugs index 8b772cbefd..60baef71a0 100644 --- a/blocking-bugs +++ b/blocking-bugs @@ -13,7 +13,7 @@ specific data is OK. * --with-ldap needs to be carefully considered; is OPENLDAP upper case really correct? Consider GCS and other options we already use. -* kdc, kadmin/ldap_util, lib/kadm5/clnt/ wants err_handle.h from lib/kdb. This seems +* kdc, kadmin/server kadmin/ldap_util, lib/kadm5/clnt/ wants err_handle.h from lib/kdb. This seems wrong and should probably be fixed either by installing that header in buildtop/include or something. @@ -26,3 +26,7 @@ doesn't mess things up too much. * I've told the kadmin client to link against -lkdb5 as a hack. That's clearly wrong but is because of brokenness in kadm5/clnt. + +* The ldap plugin also serves as a library for its administrative +interface. Determine if this is OK; I expect it to create load +problems as the plugin directory should not be on the search path. diff --git a/src/kadmin/server/Makefile.in b/src/kadmin/server/Makefile.in index 5332acbb22..d6aa54a511 100644 --- a/src/kadmin/server/Makefile.in +++ b/src/kadmin/server/Makefile.in @@ -6,7 +6,7 @@ KDB_DEP_LIB=$(DL_LIB) $(THREAD_LINKOPTS) LOCALINCLUDES = -I$(SRCTOP)/lib/gssapi/generic -I$(SRCTOP)/lib/gssapi/krb5 \ -I$(BUILDTOP)/lib/gssapi/generic -I$(BUILDTOP)/lib/gssapi/krb5 \ - -I$(BUILDTOP)/lib/kdb + -I$(SRCTOP)/lib/kdb PROG_LIBPATH=-L$(TOPLIBD) PROG_RPATH=$(KRB5_LIBDIR) diff --git a/src/plugins/kdb/db2/ChangeLog b/src/plugins/kdb/db2/ChangeLog index c6461f9ad8..93ca25a7e2 100644 --- a/src/plugins/kdb/db2/ChangeLog +++ b/src/plugins/kdb/db2/ChangeLog @@ -1,3 +1,7 @@ +2006-01-29 Sam Hartman + + * db2_exp.c (hack_init): Update prototype to match krb5_db2_lib_init + 2006-01-25 Ken Raeburn * Makefile.in (DEFINES): New variable; define macro PLUGIN. diff --git a/src/plugins/kdb/db2/db2_exp.c b/src/plugins/kdb/db2/db2_exp.c index 35f7004414..87e973eb49 100644 --- a/src/plugins/kdb/db2/db2_exp.c +++ b/src/plugins/kdb/db2/db2_exp.c @@ -193,13 +193,13 @@ WRAP_K (krb5_db2_db_get_mkey, (context, key)); static krb5_error_code -hack_init (krb5_set_err_func_t f) +hack_init () { krb5_error_code c; c = krb5int_mutex_alloc (&krb5_db2_mutex); if (c) return c; - return krb5_db2_lib_init (f); + return krb5_db2_lib_init (); } static krb5_error_code diff --git a/src/plugins/kdb/kdb_ldap/ChangeLog b/src/plugins/kdb/kdb_ldap/ChangeLog new file mode 100644 index 0000000000..7addb2fa70 --- /dev/null +++ b/src/plugins/kdb/kdb_ldap/ChangeLog @@ -0,0 +1,8 @@ +2006-01-29 Sam Hartman + + * ldap_exp.c (krb5_db_vftabl_kldap): Remove thread safe flag + + * ldap_err.c: Ignore LDAP_X_ERROR if not supported by version of OpenLDAP in use + + * ldap_principal2.c: Accept LDAP_OPT_ERROR_NUMBER as a less-preferred synonym for LDAP_OPT_RESULT_CODE + diff --git a/src/plugins/kdb/kdb_ldap/ldap_err.c b/src/plugins/kdb/kdb_ldap/ldap_err.c index acd9f0c0cc..e10c5dbf0e 100644 --- a/src/plugins/kdb/kdb_ldap/ldap_err.c +++ b/src/plugins/kdb/kdb_ldap/ldap_err.c @@ -2,6 +2,10 @@ #include #include #include "ldap_err.h" +#ifndef LDAP_X_ERROR +#define LDAP_X_ERROR(x) (0) +#endif + /* * The possible KDB errors are diff --git a/src/plugins/kdb/kdb_ldap/ldap_exp.c b/src/plugins/kdb/kdb_ldap/ldap_exp.c index 2f921ca0d7..b7bb08d240 100644 --- a/src/plugins/kdb/kdb_ldap/ldap_exp.c +++ b/src/plugins/kdb/kdb_ldap/ldap_exp.c @@ -48,7 +48,6 @@ kdb_vftabl krb5_db_vftabl_kldap = { 1, /* major version number 1 */ 0, /* minor version number 0 */ - 0, /* TBD. Not sure whether thread safe. For now, its not */ /* init_library */ krb5_ldap_lib_init, /* fini_library */ krb5_ldap_lib_cleanup, /* init_module */ krb5_ldap_open, diff --git a/src/plugins/kdb/kdb_ldap/ldap_principal2.c b/src/plugins/kdb/kdb_ldap/ldap_principal2.c index 652ec21730..3ae13397d1 100644 --- a/src/plugins/kdb/kdb_ldap/ldap_principal2.c +++ b/src/plugins/kdb/kdb_ldap/ldap_principal2.c @@ -40,6 +40,9 @@ extern char* principal_attributes[]; extern char* max_pwd_life_attr[]; +#if !defined( LDAP_OPT_RESULT_CODE) && defined(LDAP_OPT_ERROR_NUMBER) +#define LDAP_OPT_RESULT_CODE LDAP_OPT_ERROR_NUMBER +#endif static krb5_error_code krb5_decode_krbsecretkey(krb5_context, krb5_db_entry *, struct berval **, krb5_tl_data *);