未验证 提交 b1624333 编写于 作者: O openharmony_ci 提交者: Gitee

!1577 同步seccomp模块清除安全告警

Merge pull request !1577 from 夏不白/cherry-pick-1669634791
......@@ -34,8 +34,10 @@
#ifdef __aarch64__
#define FILTER_LIB_PATH_FORMAT "/system/lib64/lib%s_filter.z.so"
#define FILTER_LIB_PATH_HEAD "/system/lib64/lib"
#else
#define FILTER_LIB_PATH_FORMAT "/system/lib/lib%s_filter.z.so"
#define FILTER_LIB_PATH_HEAD "/system/lib/lib"
#endif
#define FILTER_NAME_FORMAT "g_%sSeccompFilter"
#define FILTER_SIZE_STRING "Size"
......@@ -114,6 +116,10 @@ static int GetSeccompPolicy(const char *filterName, int **handler,
return INPUT_ERROR;
}
if (strncmp(filterLibRealPath, FILTER_LIB_PATH_HEAD, strlen(FILTER_LIB_PATH_HEAD))) {
return INPUT_ERROR;
}
char filterVaribleName[PATH_MAX] = {0};
struct sock_filter *filter = NULL;
size_t *filterSize = NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册