Allow dlopening public libs using absolute path
dlopen on isolated namespaces should be able to open public libraries using absolute path not only soname. Bug: http://b/25853820 Change-Id: If574a67853dc51226f0f376e9e2d108316002f84
This commit is contained in:
@@ -1582,9 +1582,6 @@ static int open_library(android_namespace_t* ns,
|
||||
}
|
||||
}
|
||||
|
||||
if (fd != -1 && !ns->is_accessible(*realpath)) {
|
||||
fd = -1;
|
||||
}
|
||||
return fd;
|
||||
}
|
||||
|
||||
@@ -1701,6 +1698,13 @@ static bool load_library(android_namespace_t* ns,
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!ns->is_accessible(realpath)) {
|
||||
// do not load libraries if they are not accessible for the specified namespace.
|
||||
DL_ERR("library \"%s\" is not accessible for the namespace \"%s\"",
|
||||
name, ns->get_name());
|
||||
return false;
|
||||
}
|
||||
|
||||
soinfo* si = soinfo_alloc(ns, realpath.c_str(), &file_stat, file_offset, rtld_flags);
|
||||
if (si == nullptr) {
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user