As a debugging feature, report the absolute pathname of the plug-in
library that mountd loads to resolve junctions.
Since mountd passes a relative path to dlopen(3), dlopen(3) must
search for the right library. Displaying the absolute pathname of
the object that it found verifies that mountd loaded the correct
plug-in.
Note: dlinfo(3) is provided by libdl, but there doesn't seem to be a
man page on Fedora 16 for dlinfo(3). Instead, see:
http://www.unix.com/man-page/all/3/dlinfo/
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
#ifdef HAVE_NFS_PLUGIN_H
#include <dlfcn.h>
+#include <link.h>
#include <nfs-plugin.h>
/*
struct addrinfo *ai)
{
struct exportent *exp;
+ struct link_map *map;
void *handle;
handle = dlopen("libnfsjunct.so", RTLD_NOW);
xlog(D_GENERAL, "%s: dlopen: %s", __func__, dlerror());
return NULL;
}
+
+ if (dlinfo(handle, RTLD_DI_LINKMAP, &map) == 0)
+ xlog(D_GENERAL, "%s: loaded plug-in %s",
+ __func__, map->l_name);
+
(void)dlerror(); /* Clear any error */
exp = invoke_junction_ops(handle, dom, pathname, ai);