15 Star 2 Fork 68

src-openEuler/util-linux

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-tests-test_mkfds-netlink-pass-a-correct-file-descrip.patch 852 Bytes
一键复制 编辑 原始数据 按行查看 历史
Cupcake 提交于 2025-03-13 05:19 +08:00 . update version to 2.40.4
From acdba9c454506cdd29ac400df3f72bde4c74647d Mon Sep 17 00:00:00 2001
From: Masatake YAMATO <yamato@redhat.com>
Date: Wed, 3 Apr 2024 00:01:27 +0900
Subject: [PATCH] tests: (test_mkfds::netlink) pass a correct file descriptor
to bind(2)
Close #2901
The original code passed a closed file descriptor to bind(2).
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
---
tests/helpers/test_mkfds.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/helpers/test_mkfds.c b/tests/helpers/test_mkfds.c
index dd0a128a88c..28ed3bffcb4 100644
--- a/tests/helpers/test_mkfds.c
+++ b/tests/helpers/test_mkfds.c
@@ -2293,6 +2293,7 @@ static void *make_netlink(const struct factory *factory, struct fdesc fdescs[],
err(EXIT_FAILURE, "failed to dup %d -> %d", sd, fdescs[0].fd);
}
close(sd);
+ sd = fdescs[0].fd;
}
struct sockaddr_nl nl;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/util-linux.git
git@gitee.com:src-openeuler/util-linux.git
src-openeuler
util-linux
util-linux
master

搜索帮助