[master] f683585 exit VFIL_searchpath upon dlopen error

Nils Goroll nils.goroll at uplex.de
Thu Oct 12 20:08:09 UTC 2017

commit f683585753ec8ceb2f82eb4fcbf5b51bbbca3b2d
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Thu Oct 12 21:58:33 2017 +0200

    exit VFIL_searchpath upon dlopen error
    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.
    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:...

diff --git a/lib/libvcc/vcc_vmod.c b/lib/libvcc/vcc_vmod.c
index 12d21fd..30a4ae0 100644
--- a/lib/libvcc/vcc_vmod.c
+++ b/lib/libvcc/vcc_vmod.c
@@ -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);

More information about the varnish-commit mailing list