Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Musl
提交
6c15efe5
T
Third Party Musl
项目概览
OpenHarmony
/
Third Party Musl
1 年多 前同步成功
通知
37
Star
125
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Musl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
6c15efe5
编写于
6月 15, 2023
作者:
O
openharmony_ci
提交者:
Gitee
6月 15, 2023
浏览文件
操作
浏览文件
下载
差异文件
!941 回退disable相关修改
Merge pull request !941 from wangchen/0614_mu
上级
b121c66a
19b14d94
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
6 addition
and
94 deletion
+6
-94
libc.map.txt
libc.map.txt
+0
-1
porting/linux/user/include/dlfcn.h
porting/linux/user/include/dlfcn.h
+0
-2
porting/linux/user/ldso/dynlink.c
porting/linux/user/ldso/dynlink.c
+6
-91
未找到文件。
libc.map.txt
浏览文件 @
6c15efe5
...
...
@@ -518,7 +518,6 @@
dlclose;
dlerror;
dlinfo;
dlns_disable;
dlns_create;
dlns_create2;
dlns_get;
...
...
porting/linux/user/include/dlfcn.h
浏览文件 @
6c15efe5
...
...
@@ -163,8 +163,6 @@ int dlns_set_namespace_permitted_paths(const char *name, const char *permitted_p
*/
int
dlns_set_namespace_allowed_libs
(
const
char
*
name
,
const
char
*
allowed_libs
);
void
dlns_disable
(
void
);
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
typedef
struct
{
const
char
*
dli_fname
;
...
...
porting/linux/user/ldso/dynlink.c
浏览文件 @
6c15efe5
...
...
@@ -3385,7 +3385,7 @@ void *dlopen(const char *file, int mode)
return
dlopen_impl
(
file
,
mode
,
NULL
,
caller_addr
,
NULL
);
}
hidden
void
in_
dlns_init
(
Dl_namespace
*
dlns
,
const
char
*
name
)
void
dlns_init
(
Dl_namespace
*
dlns
,
const
char
*
name
)
{
if
(
!
dlns
)
{
LD_LOGE
(
"dlns_init dlns is null."
);
...
...
@@ -3400,7 +3400,7 @@ hidden void in_dlns_init(Dl_namespace *dlns, const char *name)
LD_LOGI
(
"dlns_init dlns->name:%{public}s ."
,
dlns
->
name
);
}
hidden
int
in_
dlns_get
(
const
char
*
name
,
Dl_namespace
*
dlns
)
int
dlns_get
(
const
char
*
name
,
Dl_namespace
*
dlns
)
{
if
(
!
dlns
)
{
LD_LOGE
(
"dlns_get dlns is null."
);
...
...
@@ -3458,7 +3458,7 @@ void *dlopen_ns_ext(Dl_namespace *dlns, const char *file, int mode, const dl_ext
return
dlopen_impl
(
file
,
mode
,
dlns
->
name
,
caller_addr
,
extinfo
);
}
hidden
int
in_
dlns_create2
(
Dl_namespace
*
dlns
,
const
char
*
lib_path
,
int
flags
)
int
dlns_create2
(
Dl_namespace
*
dlns
,
const
char
*
lib_path
,
int
flags
)
{
if
(
!
dlns
)
{
LD_LOGE
(
"dlns_create2 dlns is null."
);
...
...
@@ -3508,13 +3508,13 @@ hidden int in_dlns_create2(Dl_namespace *dlns, const char *lib_path, int flags)
return
0
;
}
hidden
int
in_
dlns_create
(
Dl_namespace
*
dlns
,
const
char
*
lib_path
)
int
dlns_create
(
Dl_namespace
*
dlns
,
const
char
*
lib_path
)
{
LD_LOGI
(
"dlns_create lib_paths:%{public}s"
,
lib_path
);
return
dlns_create2
(
dlns
,
lib_path
,
CREATE_INHERIT_DEFAULT
);
}
hidden
int
in_
dlns_inherit
(
Dl_namespace
*
dlns
,
Dl_namespace
*
inherited
,
const
char
*
shared_libs
)
int
dlns_inherit
(
Dl_namespace
*
dlns
,
Dl_namespace
*
inherited
,
const
char
*
shared_libs
)
{
if
(
!
dlns
||
!
inherited
)
{
LD_LOGE
(
"dlns_inherit dlns or inherited is null."
);
...
...
@@ -4085,7 +4085,7 @@ int dlns_set_namespace_permitted_paths(const char * name, const char * permitted
return
0
;
}
hidden
int
in_
dlns_set_namespace_allowed_libs
(
const
char
*
name
,
const
char
*
allowed_libs
)
int
dlns_set_namespace_allowed_libs
(
const
char
*
name
,
const
char
*
allowed_libs
)
{
if
(
!
name
||
!
allowed_libs
)
{
LD_LOGE
(
"dlns_set_namespace_allowed_libs name or allowed_libs is null."
);
...
...
@@ -5305,88 +5305,3 @@ static void find_and_set_bss_name(struct dso *p)
}
}
}
struct
dlns_hook
{
void
(
*
dlns_init_hook
)(
Dl_namespace
*
,
const
char
*
);
int
(
*
dlns_get_hook
)(
const
char
*
,
Dl_namespace
*
);
int
(
*
dlns_create_hook
)(
Dl_namespace
*
,
const
char
*
);
int
(
*
dlns_create2_hook
)(
Dl_namespace
*
,
const
char
*
,
int
);
int
(
*
dlns_inherit_hook
)(
Dl_namespace
*
,
Dl_namespace
*
,
const
char
*
);
int
(
*
dlns_set_namespace_allowed_libs_hook
)(
const
char
*
name
,
const
char
*
allowed_libs
);
};
static
struct
dlns_hook
hook
=
{
.
dlns_init_hook
=
in_dlns_init
,
.
dlns_get_hook
=
in_dlns_get
,
.
dlns_create_hook
=
in_dlns_create
,
.
dlns_create2_hook
=
in_dlns_create2
,
.
dlns_inherit_hook
=
in_dlns_inherit
,
.
dlns_set_namespace_allowed_libs_hook
=
in_dlns_set_namespace_allowed_libs
,
};
void
dlns_init
(
Dl_namespace
*
dlns
,
const
char
*
name
)
{
if
(
hook
.
dlns_init_hook
==
NULL
)
{
return
;
}
hook
.
dlns_init_hook
(
dlns
,
name
);
return
;
}
int
dlns_get
(
const
char
*
name
,
Dl_namespace
*
dlns
)
{
if
(
hook
.
dlns_get_hook
==
NULL
)
{
return
EINVAL
;
}
return
hook
.
dlns_get_hook
(
name
,
dlns
);
}
int
dlns_create
(
Dl_namespace
*
dlns
,
const
char
*
lib_path
)
{
if
(
hook
.
dlns_create_hook
==
NULL
)
{
return
EINVAL
;
}
return
hook
.
dlns_create_hook
(
dlns
,
lib_path
);
}
int
dlns_create2
(
Dl_namespace
*
dlns
,
const
char
*
lib_path
,
int
flags
)
{
if
(
hook
.
dlns_create2_hook
==
NULL
)
{
return
EINVAL
;
}
return
hook
.
dlns_create2_hook
(
dlns
,
lib_path
,
flags
);
}
int
dlns_inherit
(
Dl_namespace
*
dlns
,
Dl_namespace
*
inherited
,
const
char
*
shared_libs
)
{
if
(
hook
.
dlns_inherit_hook
==
NULL
)
{
return
EINVAL
;
}
return
hook
.
dlns_inherit_hook
(
dlns
,
inherited
,
shared_libs
);
}
int
dlns_set_namespace_allowed_libs
(
const
char
*
name
,
const
char
*
allowed_libs
)
{
if
(
hook
.
dlns_set_namespace_allowed_libs_hook
==
NULL
)
{
return
EINVAL
;
}
return
hook
.
dlns_set_namespace_allowed_libs_hook
(
name
,
allowed_libs
);
}
void
dlns_disable
()
{
hook
.
dlns_init_hook
=
NULL
;
hook
.
dlns_get_hook
=
NULL
;
hook
.
dlns_create_hook
=
NULL
;
hook
.
dlns_create2_hook
=
NULL
;
hook
.
dlns_inherit_hook
=
NULL
;
hook
.
dlns_set_namespace_allowed_libs_hook
=
NULL
;
return
;
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录