Improve isolation of bindings
authorJosé Bollo <jose.bollo@iot.bzh>
Wed, 6 Sep 2017 06:58:29 +0000 (08:58 +0200)
committerJosé Bollo <jose.bollo@iot.bzh>
Thu, 7 Sep 2017 07:44:00 +0000 (09:44 +0200)
Adding this flag will avoid potential conflict
with previously loaded bindings.

Change-Id: Iae42a68fa4750d107895dc01045aac7b885759f7
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
src/afb-api-so.c

index cfa992e..3588e16 100644 (file)
@@ -65,7 +65,7 @@ static int load_binding(const char *path, int force, struct afb_apiset *apiset)
 
        // This is a loadable library let's check if it's a binding
        rc = -!!force;
-       handle = safe_dlopen(path, RTLD_NOW | RTLD_LOCAL);
+       handle = safe_dlopen(path, RTLD_NOW | RTLD_LOCAL | RTLD_DEEPBIND);
        if (handle == NULL) {
                if (force)
                        ERROR("binding [%s] not loadable: %s", path, dlerror());