Removed current directory from the module search path.

This commit is contained in:
Markus Makela
2015-04-29 07:03:05 +03:00
parent 5394b4d0fa
commit c035f4b8b7

View File

@ -133,10 +133,7 @@ MODULE_INFO *mod_info = NULL;
* *
* Search of the shared object. * Search of the shared object.
*/ */
snprintf(fname,MAXPATHLEN+1, "./lib%s.so", module);
if (access(fname, F_OK) == -1)
{
snprintf(fname, MAXPATHLEN+1,"%s/lib%s.so", get_libdir(), module); snprintf(fname, MAXPATHLEN+1,"%s/lib%s.so", get_libdir(), module);
if (access(fname, F_OK) == -1) if (access(fname, F_OK) == -1)
@ -148,7 +145,6 @@ MODULE_INFO *mod_info = NULL;
module, get_libdir()))); module, get_libdir())));
return NULL; return NULL;
} }
}
if ((dlhandle = dlopen(fname, RTLD_NOW|RTLD_LOCAL)) == NULL) if ((dlhandle = dlopen(fname, RTLD_NOW|RTLD_LOCAL)) == NULL)
{ {