From: Ken Raeburn Date: Wed, 6 Jul 2005 23:24:29 +0000 (+0000) Subject: * kdb5.c (kdb_get_library_name, kdb_load_library): Change default name to "db2". X-Git-Tag: ms-bug-test-20060525~193 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e35c21e74690673953707f045f1d529ca435a841;p=krb5.git * kdb5.c (kdb_get_library_name, kdb_load_library): Change default name to "db2". (kdb_get_library_name): On error reading from the config file, don't just use the default. (kdb_load_library): Don't add "lib" prefix on module name. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17295 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/kdb/ChangeLog b/src/lib/kdb/ChangeLog index b17d580d5..d62537cd5 100644 --- a/src/lib/kdb/ChangeLog +++ b/src/lib/kdb/ChangeLog @@ -1,3 +1,11 @@ +2005-07-06 Ken Raeburn + + * kdb5.c (kdb_get_library_name, kdb_load_library): Change default + name to "db2". + (kdb_get_library_name): On error reading from the config file, + don't just use the default. + (kdb_load_library): Don't add "lib" prefix on module name. + 2005-07-01 Ken Raeburn * err_handle.c (krb5_err_key): Variable deleted. diff --git a/src/lib/kdb/kdb5.c b/src/lib/kdb/kdb5.c index 0d6bded5f..0eb6a45dd 100644 --- a/src/lib/kdb/kdb5.c +++ b/src/lib/kdb/kdb5.c @@ -220,7 +220,7 @@ kdb_get_library_name(krb5_context kcontext) status = profile_get_string(kcontext->profile, KDB_MODULE_SECTION, value, KDB_LIB_POINTER, /* default to db2 */ - "kdb_db2", + "db2", &lib); if (status) { @@ -238,11 +238,6 @@ kdb_get_library_name(krb5_context kcontext) /* free profile string */ profile_release_string(lib); } - - if (status) { - /* any error default to db2 */ - result = strdup("kdb_db2"); - } return result; } @@ -364,7 +359,7 @@ kdb_load_library(krb5_context kcontext, char *lib_name, db_library * lib) void *vftabl_addr; char *err_str = NULL; - if (!strcmp("kdb_db2", lib_name) && (kdb_db2_pol_err_loaded == 0)) { + if (!strcmp("db2", lib_name) && (kdb_db2_pol_err_loaded == 0)) { initialize_adb_error_table(); kdb_db2_pol_err_loaded = 1; } @@ -383,7 +378,7 @@ kdb_load_library(krb5_context kcontext, char *lib_name, db_library * lib) strcpy((*lib)->name, lib_name); for (ndx = 0; db_dl_location[ndx]; ndx++) { - sprintf(dl_name, "%s/lib%s.so", db_dl_location[ndx], lib_name); + sprintf(dl_name, "%s/%s.so", db_dl_location[ndx], lib_name); (*lib)->dl_handle = dlopen(dl_name, RTLD_NOW); if ((*lib)->dl_handle) { /* found the module */