[krbdev.mit.edu #8263] db_module_dir doesn't stop modules in install tree from being loaded
Greg Hudson via RT
rt-comment at krbdev.mit.edu
Fri Oct 2 16:31:27 EDT 2015
The KDB interface does not use the new plugin framework yet. The
location of DB modules can be controlled by the db_module_dir
variable, which we use in the test suite.
When db_module_dir is set, kdb_load_library() concatenates all values
of the variable and the hardcoded install-tree path and calls
krb5int_open_plugin_dirs() on the full list, with a filebases of the
module name (like "db2"). It then calls
krb5int_get_plugin_dir_data() to load all modules in all of the named
directories which match the filebase and contain a
"kdb_function_table" symbol. Only the first result is used.
In a typical test suite scenario with a populated install tree, the
db2.so from the build tree and the db2.so from the install tree will
both be loaded, but only the build tree module will be used.
Although this is generally harmless to the tests, anyone
instrumenting the test suite will see an alarming reference to the
install tree.
kdb_load_library() should not use the hardcoded pathname if
db_module_dir is set.
More information about the krb5-bugs
mailing list