Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Startup Init Lite
提交
b685aabe
S
Startup Init Lite
项目概览
OpenHarmony
/
Startup Init Lite
10 个月 前同步成功
通知
3
Star
37
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Startup Init Lite
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
b685aabe
编写于
5月 25, 2022
作者:
M
Mupceet
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
init: fix bugs
Signed-off-by:
N
Mupceet
<
laiguizhong@huawei.com
>
上级
8534c414
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
6 addition
and
6 deletion
+6
-6
interfaces/innerkits/sandbox/include/sandbox.h
interfaces/innerkits/sandbox/include/sandbox.h
+0
-1
interfaces/innerkits/sandbox/include/sandbox_namespace.h
interfaces/innerkits/sandbox/include/sandbox_namespace.h
+3
-2
interfaces/innerkits/sandbox/sandbox.c
interfaces/innerkits/sandbox/sandbox.c
+1
-1
interfaces/innerkits/sandbox/sandbox_namespace.c
interfaces/innerkits/sandbox/sandbox_namespace.c
+2
-2
未找到文件。
interfaces/innerkits/sandbox/include/sandbox.h
浏览文件 @
b685aabe
...
...
@@ -56,7 +56,6 @@ bool InitSandboxWithName(const char *name);
int
PrepareSandbox
(
const
char
*
name
);
int
EnterSandbox
(
const
char
*
name
);
void
DestroySandbox
(
const
char
*
name
);
int
CheckSupportSandbox
(
void
);
void
DumpSandboxByName
(
const
char
*
name
);
#ifdef __cplusplus
}
...
...
interfaces/innerkits/sandbox/include/sandbox_namespace.h
浏览文件 @
b685aabe
...
...
@@ -23,7 +23,7 @@ extern "C" {
int
GetNamespaceFd
(
const
char
*
nsPath
);
int
UnshareNamespace
(
int
nsType
);
int
SetNamespce
(
int
nsFd
,
int
nsType
);
int
SetNamesp
a
ce
(
int
nsFd
,
int
nsType
);
void
InitDefaultNamespace
(
void
);
int
EnterDefaultNamespace
(
void
);
void
CloseDefaultNamespace
(
void
);
...
...
@@ -33,4 +33,5 @@ void CloseDefaultNamespace(void);
}
#endif
#endif
#endif
\ No newline at end of file
#endif
interfaces/innerkits/sandbox/sandbox.c
100755 → 100644
浏览文件 @
b685aabe
...
...
@@ -602,7 +602,7 @@ int EnterSandbox(const char *name)
return
-
1
;
}
if
(
sandbox
->
ns
>
0
)
{
if
(
SetNamespce
(
sandbox
->
ns
,
CLONE_NEWNS
)
<
0
)
{
if
(
SetNamesp
a
ce
(
sandbox
->
ns
,
CLONE_NEWNS
)
<
0
)
{
BEGET_LOGE
(
"Failed to enter mount namespace for sandbox
\'
%s
\'
, err=%d."
,
name
,
errno
);
return
-
1
;
}
...
...
interfaces/innerkits/sandbox/sandbox_namespace.c
浏览文件 @
b685aabe
...
...
@@ -51,7 +51,7 @@ int UnshareNamespace(int nsType)
}
}
int
SetNamespce
(
int
nsFd
,
int
nsType
)
int
SetNamesp
a
ce
(
int
nsFd
,
int
nsType
)
{
if
(
nsFd
<
0
)
{
BEGET_LOGE
(
"Failed get namespace fd"
);
...
...
@@ -78,7 +78,7 @@ int EnterDefaultNamespace(void)
if
(
g_defaultNs
<
0
)
{
return
-
1
;
}
return
SetNamespce
(
g_defaultNs
,
CLONE_NEWNS
);
return
SetNamesp
a
ce
(
g_defaultNs
,
CLONE_NEWNS
);
}
void
CloseDefaultNamespace
(
void
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录