未验证 提交 aa17829f 编写于 作者: T Tianjia Zhang 提交者: GitHub

rune/libcontainer: Supports more paths for LD_LIBRARY_PATH

Current path for LD_LIBRARY_PATH is used for centos. This patches adds the support
for more Linux distributions .
Signed-off-by: NTianjia Zhang <tianjia.zhang@linux.alibaba.com>
上级 037185ff
......@@ -77,7 +77,8 @@ int load_enclave_runtime(void)
return -ENOSPC;
}
snprintf(sofile, sizeof(sofile), "%s/%s", rootfs, file);
snprintf(ldpath, sizeof(ldpath), "%s/lib64", rootfs);
snprintf(ldpath, sizeof(ldpath), "%s/usr/lib:%s/usr/lib64:%s/lib:%s/lib64",
rootfs, rootfs, rootfs, rootfs);
env_ldpath = getenv("LD_LIBRARY_PATH");
if (env_ldpath && *env_ldpath != '\0') {
......@@ -99,6 +100,8 @@ int load_enclave_runtime(void)
if (dl == NULL) {
write_log(DEBUG, "dlopen(): %s", dlerror());
/* set errno correctly, make bail() work better */
errno = ENOEXEC;
return -ENOEXEC;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册