Skip to content

Commit

Permalink
exit VFIL_searchpath upon dlopen error
Browse files Browse the repository at this point in the history
Together with the previous commit, this fixes potentially misleading
error messages.

Because we called vcc_path_dlopen on all vmod_path elements
irrespective of the kind of dlopen() error, the actual root cause
could be hidden.

Example:

dlerror: .../lib/libvmod_blob/.libs/libvmod_debug.so: cannot open shared object file

when the actual error was

dlerror: .../lib/libvmod_debug/.libs/libvmod_debug.so: undefined symbol:...
  • Loading branch information
nigoroll committed Oct 12, 2017
1 parent 8e9eb0f commit f683585
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/libvcc/vcc_vmod.c
Expand Up @@ -48,7 +48,7 @@ vcc_path_dlopen(void *priv, const char *fn)

hdl = dlopen(fn, RTLD_NOW | RTLD_LOCAL);
if (hdl == NULL)
return (1);
return (-1);
pp = priv;
*pp = hdl;
return (0);
Expand Down

0 comments on commit f683585

Please sign in to comment.