1 Star 0 Fork 49

问书/systemd_bak

forked from src-anolis-os/systemd 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0515-udev-test-check-if-permitted-to-create-block-device-.patch 1.05 KB
一键复制 编辑 原始数据 按行查看 历史
geliwei 提交于 2021-06-16 16:46 . update to systemd-239-45.el8.src.rpm
From 57e9ee0f19098d56995955f6692437affdf94041 Mon Sep 17 00:00:00 2001
From: Alexey Bogdanenko <alexey@bogdanenko.com>
Date: Tue, 11 Dec 2018 16:55:34 +0300
Subject: [PATCH] udev-test: check if permitted to create block device nodes
(cherry picked from commit dbfbc6c4e34366033cb340e8b0c3cbca683ff6f5)
Related: #1642728
---
test/udev-test.pl | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/test/udev-test.pl b/test/udev-test.pl
index eb76ebd72e..957cda541c 100755
--- a/test/udev-test.pl
+++ b/test/udev-test.pl
@@ -1554,6 +1554,14 @@ sub udev_setup {
return 0;
}
+ # check if we are permitted to create block device nodes
+ my $block_device_filename = $udev_dev . "/sda";
+ if (system("mknod", $block_device_filename, "b", "8", "0")) {
+ warn "unable to create $block_device_filename";
+ return 0;
+ }
+ unlink $block_device_filename;
+
system("cp", "-r", "test/sys/", $udev_sys) && die "unable to copy test/sys";
system("rm", "-rf", "$udev_run");
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/Weisson/systemd_bak.git
git@gitee.com:Weisson/systemd_bak.git
Weisson
systemd_bak
systemd_bak
a8

搜索帮助

0d507c66 1850385 C8b1a773 1850385