代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/systemd 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 675dd1039c69ff28ce9c7e617fcede80e998b3e9 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 13 Jul 2022 23:44:45 +0200
Subject: [PATCH] tmpfiles: check the directory we were supposed to create, not
its parent
This current code checks the wrong directory. This was broken in
4c39d899ff00e90b7290e4985696f321d7f2726f which converted the previous
code incorrectly.
(cherry picked from commit 92631578fff1568fa8e99f96de05baae5b258ffe)
(cherry picked from commit 625472b219a4b1ac64534d38cf6e64b51ab22bbb)
(cherry picked from commit 8b674cf43f1ba8137da3a90c67826f13c865838c)
Conflict:NA
Reference:https://github.com/systemd/systemd/commit/675dd1039c69ff28ce9c7e617fcede80e998b3e9
---
src/tmpfiles/tmpfiles.c | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
index 7e85c50634..1bfb1cbe16 100644
--- a/src/tmpfiles/tmpfiles.c
+++ b/src/tmpfiles/tmpfiles.c
@@ -1666,15 +1666,12 @@ static int create_directory_or_subvolume(const char *path, mode_t mode, bool sub
r = btrfs_is_subvol(empty_to_root(arg_root)) > 0;
}
if (!r)
- /* Don't create a subvolume unless the root directory is
- * one, too. We do this under the assumption that if the
- * root directory is just a plain directory (i.e. very
- * light-weight), we shouldn't try to split it up into
- * subvolumes (i.e. more heavy-weight). Thus, chroot()
- * environments and suchlike will get a full brtfs
- * subvolume set up below their tree only if they
- * specifically set up a btrfs subvolume for the root
- * dir too. */
+ /* Don't create a subvolume unless the root directory is one, too. We do this under
+ * the assumption that if the root directory is just a plain directory (i.e. very
+ * light-weight), we shouldn't try to split it up into subvolumes (i.e. more
+ * heavy-weight). Thus, chroot() environments and suchlike will get a full brtfs
+ * subvolume set up below their tree only if they specifically set up a btrfs
+ * subvolume for the root dir too. */
subvol = false;
else {
@@ -1694,7 +1691,7 @@ static int create_directory_or_subvolume(const char *path, mode_t mode, bool sub
if (!IN_SET(r, -EEXIST, -EROFS))
return log_error_errno(r, "Failed to create directory or subvolume \"%s\": %m", path);
- k = is_dir_fd(pfd);
+ k = is_dir_full(pfd, basename(path), /* follow= */ false);
if (k == -ENOENT && r == -EROFS)
return log_error_errno(r, "%s does not exist and cannot be created as the file system is read-only.", path);
if (k < 0)
--
2.27.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。