!347 do mask paths after parent mounted
From: @driedyellowpeach Reviewed-by: @duguhaotian Signed-off-by: @duguhaotian
This commit is contained in:
commit
cbc3fc6f69
44
0015-fix-do-mask-pathes-after-parent-mounted.patch
Normal file
44
0015-fix-do-mask-pathes-after-parent-mounted.patch
Normal file
@ -0,0 +1,44 @@
|
||||
From 96a35e077d21a1abf1cc3819fb842b8089ee268d Mon Sep 17 00:00:00 2001
|
||||
From: isuladci <isulad@ci.com>
|
||||
Date: Tue, 20 Sep 2022 01:40:18 -0700
|
||||
Subject: [PATCH] fix do mask pathes after parent mounted
|
||||
|
||||
Signed-off-by: isuladci <isulad@ci.com>
|
||||
---
|
||||
src/lxc/conf.c | 14 +++++++-------
|
||||
1 file changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/lxc/conf.c b/src/lxc/conf.c
|
||||
index 378cf9f..439601a 100644
|
||||
--- a/src/lxc/conf.c
|
||||
+++ b/src/lxc/conf.c
|
||||
@@ -3975,19 +3975,19 @@ int lxc_setup(struct lxc_handler *handler)
|
||||
}
|
||||
|
||||
#ifdef HAVE_ISULAD
|
||||
- // isulad: setup rootfs masked paths
|
||||
- if (!lxc_list_empty(&lxc_conf->rootfs.maskedpaths)) {
|
||||
- if (setup_rootfs_maskedpaths(&lxc_conf->rootfs.maskedpaths)) {
|
||||
- return log_error(-1, "failed to setup maskedpaths");
|
||||
- }
|
||||
- }
|
||||
-
|
||||
// isulad: setup rootfs ro paths
|
||||
if (!lxc_list_empty(&lxc_conf->rootfs.ropaths)) {
|
||||
if (setup_rootfs_ropaths(&lxc_conf->rootfs.ropaths)) {
|
||||
return log_error(-1, "failed to setup readonlypaths");
|
||||
}
|
||||
}
|
||||
+
|
||||
+ // isulad: setup rootfs masked paths
|
||||
+ if (!lxc_list_empty(&lxc_conf->rootfs.maskedpaths)) {
|
||||
+ if (setup_rootfs_maskedpaths(&lxc_conf->rootfs.maskedpaths)) {
|
||||
+ return log_error(-1, "failed to setup maskedpaths");
|
||||
+ }
|
||||
+ }
|
||||
|
||||
//isulad: system container, remount /proc/sys/xxx by mount_list
|
||||
if (lxc_conf->systemd != NULL && strcmp(lxc_conf->systemd, "true") == 0) {
|
||||
--
|
||||
2.25.1
|
||||
|
||||
9
lxc.spec
9
lxc.spec
@ -1,4 +1,4 @@
|
||||
%global _release 2022090201
|
||||
%global _release 2022092001
|
||||
|
||||
Name: lxc
|
||||
Version: 4.0.3
|
||||
@ -22,6 +22,7 @@ Patch0011: 0011-drop-security_context_t.patch
|
||||
Patch0012: 0012-only-set-user-or-image-set-non-empty-HOME.patch
|
||||
Patch0013: 0013-return-fail-if-no-args-or-no-rootfs-path-found.patch
|
||||
Patch0014: 0014-fix-tools-using-option-give-error-message.patch
|
||||
Patch0015: 0015-fix-do-mask-pathes-after-parent-mounted.patch
|
||||
|
||||
BuildRequires: systemd-units git libtool graphviz docbook2X doxygen chrpath
|
||||
BuildRequires: pkgconfig(libseccomp)
|
||||
@ -193,6 +194,12 @@ make check
|
||||
%{_mandir}/*/man7/%{name}*
|
||||
|
||||
%changelog
|
||||
* Tue Sep 20 2022 Neil.wrz<wangrunze13@huawei.com> - 4.0.3-2022092001
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC: do mask pathes after parent mounted
|
||||
|
||||
* Fri Sep 2 2022 Neil.wrz<wangrunze13@huawei.com> - 4.0.3-2022090201
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
|
||||
@ -12,3 +12,4 @@
|
||||
0012-only-set-user-or-image-set-non-empty-HOME.patch
|
||||
0013-return-fail-if-no-args-or-no-rootfs-path-found.patch
|
||||
0014-fix-tools-using-option-give-error-message.patch
|
||||
0015-fix-do-mask-pathes-after-parent-mounted.patch
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user