Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
iSulad
提交
ed7060ea
I
iSulad
项目概览
openeuler
/
iSulad
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
I
iSulad
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ed7060ea
编写于
8月 22, 2020
作者:
O
openeuler-ci-bot
提交者:
Gitee
8月 22, 2020
浏览文件
操作
浏览文件
下载
差异文件
!661 maskpath: donot mask cnos path now
Merge pull request !661 from lifeng_isula/master
上级
49a3b85c
2ad24b22
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
25 addition
and
30 deletion
+25
-30
src/contrib/config/config.json
src/contrib/config/config.json
+1
-3
src/contrib/config/systemcontainer_config.json
src/contrib/config/systemcontainer_config.json
+1
-3
src/daemon/modules/image/oci/oci_load.c
src/daemon/modules/image/oci/oci_load.c
+1
-2
src/daemon/modules/image/oci/storage/layer_store/graphdriver/devmapper/driver_devmapper.c
...rage/layer_store/graphdriver/devmapper/driver_devmapper.c
+1
-1
src/utils/cutils/path.c
src/utils/cutils/path.c
+16
-18
src/utils/cutils/utils_file.c
src/utils/cutils/utils_file.c
+5
-3
未找到文件。
src/contrib/config/config.json
浏览文件 @
ed7060ea
...
...
@@ -270,9 +270,7 @@
"/proc/slaballoc_module"
,
"/proc/slaballoc_bt"
,
"/proc/lru_info/dump_lru_info"
,
"/proc/lru_info/lru_info_file"
,
"/proc/pin_memory"
,
"/proc/1/app_id"
"/proc/lru_info/lru_info_file"
],
"readonlyPaths"
:
[
"/proc/asound"
,
...
...
src/contrib/config/systemcontainer_config.json
浏览文件 @
ed7060ea
...
...
@@ -315,9 +315,7 @@
"/proc/slaballoc_module"
,
"/proc/slaballoc_bt"
,
"/proc/lru_info/dump_lru_info"
,
"/proc/lru_info/lru_info_file"
,
"/proc/pin_memory"
,
"/proc/1/app_id"
"/proc/lru_info/lru_info_file"
],
"readonlyPaths"
:
[
"/proc/asound"
,
...
...
src/daemon/modules/image/oci/oci_load.c
浏览文件 @
ed7060ea
...
...
@@ -1049,8 +1049,7 @@ out:
free
(
manifest
);
if
(
im
!=
NULL
)
{
if
(
im
->
layer_of_hold_flag
!=
NULL
&&
storage_set_hold_flag
(
im
->
layer_of_hold_flag
,
false
)
!=
0
)
{
if
(
im
->
layer_of_hold_flag
!=
NULL
&&
storage_set_hold_flag
(
im
->
layer_of_hold_flag
,
false
)
!=
0
)
{
ERROR
(
"clear hold flag failed for layer %s"
,
im
->
layer_of_hold_flag
);
}
...
...
src/daemon/modules/image/oci/storage/layer_store/graphdriver/devmapper/driver_devmapper.c
浏览文件 @
ed7060ea
...
...
@@ -431,7 +431,7 @@ static void status_append(const char *name, const char *value, uint64_t u_data,
#define MAX_INFO_LENGTH 100
char
tmp
[
PATH_MAX
]
=
{
0
};
char
*
str
=
NULL
;
size_
t
nret
=
0
;
in
t
nret
=
0
;
if
(
name
==
NULL
)
{
ERROR
(
"invalid argument"
);
...
...
src/utils/cutils/path.c
浏览文件 @
ed7060ea
...
...
@@ -29,8 +29,8 @@
#include "utils_file.h"
#define ISSLASH(C) ((C) == '/')
#define IS_ABSOLUTE_FILE_NAME(F) (ISSLASH
((F)[0]))
#define IS_RELATIVE_FILE_NAME(F) (!IS_ABSOLUTE_FILE_NAME
(F))
#define IS_ABSOLUTE_FILE_NAME(F) (ISSLASH((F)[0]))
#define IS_RELATIVE_FILE_NAME(F) (!IS_ABSOLUTE_FILE_NAME(F))
static
bool
do_clean_path_continue
(
const
char
*
endpos
,
const
char
*
stpos
,
const
char
*
respath
,
char
**
dst
)
{
...
...
@@ -50,8 +50,7 @@ static bool do_clean_path_continue(const char *endpos, const char *stpos, const
return
false
;
}
static
int
do_clean_path
(
const
char
*
respath
,
const
char
*
limit_respath
,
const
char
*
stpos
,
char
**
dst
)
static
int
do_clean_path
(
const
char
*
respath
,
const
char
*
limit_respath
,
const
char
*
stpos
,
char
**
dst
)
{
char
*
dest
=
*
dst
;
const
char
*
endpos
=
NULL
;
...
...
@@ -98,8 +97,7 @@ char *cleanpath(const char *path, char *realpath, size_t realpath_len)
const
char
*
stpos
=
NULL
;
const
char
*
limit_respath
=
NULL
;
if
(
path
==
NULL
||
path
[
0
]
==
'\0'
||
\
realpath
==
NULL
||
(
realpath_len
<
PATH_MAX
))
{
if
(
path
==
NULL
||
path
[
0
]
==
'\0'
||
realpath
==
NULL
||
(
realpath_len
<
PATH_MAX
))
{
return
NULL
;
}
...
...
@@ -146,8 +144,7 @@ error:
return
NULL
;
}
static
int
do_path_realloc
(
const
char
*
start
,
const
char
*
end
,
char
**
rpath
,
char
**
dest
,
const
char
**
rpath_limit
)
static
int
do_path_realloc
(
const
char
*
start
,
const
char
*
end
,
char
**
rpath
,
char
**
dest
,
const
char
**
rpath_limit
)
{
int
nret
=
0
;
size_t
new_size
;
...
...
@@ -184,8 +181,7 @@ static int do_path_realloc(const char *start, const char *end,
return
0
;
}
static
int
do_get_symlinks_copy_buf
(
const
char
*
buf
,
const
char
*
prefix
,
size_t
prefix_len
,
char
**
rpath
,
char
**
dest
)
static
int
do_get_symlinks_copy_buf
(
const
char
*
buf
,
const
char
*
prefix
,
size_t
prefix_len
,
char
**
rpath
,
char
**
dest
)
{
if
(
IS_ABSOLUTE_FILE_NAME
(
buf
))
{
if
(
prefix_len
)
{
...
...
@@ -203,9 +199,8 @@ static int do_get_symlinks_copy_buf(const char *buf, const char *prefix, size_t
return
0
;
}
static
int
do_get_symlinks
(
const
char
**
fullpath
,
const
char
*
prefix
,
size_t
prefix_len
,
char
**
rpath
,
char
**
dest
,
const
char
**
end
,
int
*
num_links
,
char
**
extra_buf
)
static
int
do_get_symlinks
(
const
char
**
fullpath
,
const
char
*
prefix
,
size_t
prefix_len
,
char
**
rpath
,
char
**
dest
,
const
char
**
end
,
int
*
num_links
,
char
**
extra_buf
)
{
int
ret
=
-
1
;
size_t
len
;
...
...
@@ -305,9 +300,8 @@ static inline bool is_specify_parent(const char *end, const char *start)
return
(
end
-
start
==
2
)
&&
is_current_char
(
start
[
0
])
&&
is_current_char
(
start
[
1
]);
}
static
int
do_eval_symlinks_in_scope
(
const
char
*
fullpath
,
const
char
*
prefix
,
size_t
prefix_len
,
char
**
rpath
,
char
**
dest
,
const
char
*
rpath_limit
)
static
int
do_eval_symlinks_in_scope
(
const
char
*
fullpath
,
const
char
*
prefix
,
size_t
prefix_len
,
char
**
rpath
,
char
**
dest
,
const
char
*
rpath_limit
)
{
int
nret
=
0
;
int
num_links
=
0
;
...
...
@@ -397,6 +391,11 @@ static char *eval_symlinks_in_scope(const char *fullpath, const char *rootpath)
prefix_len
=
0
;
}
if
(
prefix_len
>=
(
PATH_MAX
-
1
))
{
ERROR
(
"prefix too long"
);
goto
out
;
}
dest
=
rpath
;
if
(
prefix_len
)
{
(
void
)
memcpy
(
rpath
,
prefix
,
prefix_len
);
...
...
@@ -404,8 +403,7 @@ static char *eval_symlinks_in_scope(const char *fullpath, const char *rootpath)
}
*
dest
++
=
'/'
;
if
(
do_eval_symlinks_in_scope
(
fullpath
,
prefix
,
prefix_len
,
&
rpath
,
&
dest
,
rpath_limit
))
{
if
(
do_eval_symlinks_in_scope
(
fullpath
,
prefix
,
prefix_len
,
&
rpath
,
&
dest
,
rpath_limit
))
{
goto
out
;
}
...
...
src/utils/cutils/utils_file.c
浏览文件 @
ed7060ea
...
...
@@ -188,6 +188,10 @@ int util_mkdir_p(const char *dir, mode_t mode)
UTIL_FREE_AND_SET_NULL
(
cur_dir
);
}
while
(
tmp_pos
!=
dir
);
if
(
chmod
(
base
,
mode
)
!=
0
)
{
SYSERROR
(
"Failed to chmod for directory"
);
}
return
0
;
err_out:
free
(
cur_dir
);
...
...
@@ -345,8 +349,7 @@ static int exec_force_rmdir_command(const char *dir)
return
-
1
;
}
if
(
util_array_append
(
&
args
,
"rm"
)
!=
0
||
util_array_append
(
&
args
,
"-rf"
)
!=
0
||
if
(
util_array_append
(
&
args
,
"rm"
)
!=
0
||
util_array_append
(
&
args
,
"-rf"
)
!=
0
||
util_array_append
(
&
args
,
dir
)
!=
0
)
{
ERROR
(
"Out of memory"
);
ret
=
-
1
;
...
...
@@ -1571,4 +1574,3 @@ out:
free
(
line
);
return
ret
;
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录