* kdb5.c (kdb_get_library_name, kdb_load_library): Change default name to "db2".
authorKen Raeburn <raeburn@mit.edu>
Wed, 6 Jul 2005 23:24:29 +0000 (23:24 +0000)
committerKen Raeburn <raeburn@mit.edu>
Wed, 6 Jul 2005 23:24:29 +0000 (23:24 +0000)
(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

src/lib/kdb/ChangeLog
src/lib/kdb/kdb5.c

index b17d580d553651786c2e60c95c25a62fcd98ccb5..d62537cd5a2d581dfba1f0b402df2f84376091a8 100644 (file)
@@ -1,3 +1,11 @@
+2005-07-06  Ken Raeburn  <raeburn@mit.edu>
+
+       * 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  <raeburn@mit.edu>
 
        * err_handle.c (krb5_err_key): Variable deleted.
index 0d6bded5fb1862673516d4562a0ba5fbae9ac036..0eb6a45dd4e1a4bd0c6818bbec2f53153ed95866 100644 (file)
@@ -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 */