1 Star 0 Fork 49

YYNA/systemd

forked from src-anolis-os/systemd 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0658-test-seccomp-accept-ENOSYS-from-sysctl-2-too.patch 995 Bytes
一键复制 编辑 原始数据 按行查看 历史
geliwei 提交于 2022-04-13 15:44 . update to systemd-239-58.el8.src.rpm
From 8c15742d1194e0db9a2555553e4d77ebb441b3dc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Tue, 22 Sep 2020 19:05:17 +0200
Subject: [PATCH] test-seccomp: accept ENOSYS from sysctl(2) too
It seems that kernel 5.9 started returning that.
(cherry picked from commit 0af05e485a3a88f454c714901eb6109307dc893e)
Related: #2017033
---
src/test/test-seccomp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/test/test-seccomp.c b/src/test/test-seccomp.c
index 5eb1c78b8b..6ec04c4c55 100644
--- a/src/test/test-seccomp.c
+++ b/src/test/test-seccomp.c
@@ -239,7 +239,7 @@ static void test_protect_sysctl(void) {
if (pid == 0) {
#if defined __NR__sysctl && __NR__sysctl >= 0
assert_se(syscall(__NR__sysctl, NULL) < 0);
- assert_se(errno == EFAULT);
+ assert_se(IN_SET(errno, EFAULT, ENOSYS));
#endif
assert_se(seccomp_protect_sysctl() >= 0);
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ful9/systemd.git
git@gitee.com:ful9/systemd.git
ful9
systemd
systemd
a8

搜索帮助

0d507c66 1850385 C8b1a773 1850385