fix do mask paths after parent mounted
Signed-off-by: Neil.wrz <wangrunze13@huawei.com> (cherry picked from commit fc6467c52155f775a3738712ef2315943c098c7f)
This commit is contained in:
parent
44645946f4
commit
ef48d51b7c
45
0048-fix-do-mask-paths-after-parent-mounted.patch
Normal file
45
0048-fix-do-mask-paths-after-parent-mounted.patch
Normal file
@ -0,0 +1,45 @@
|
||||
From d349251fa2e05b111b230a78f782c2552095adf5 Mon Sep 17 00:00:00 2001
|
||||
From: "Neil.wrz" <wangrunze13@huawei.com>
|
||||
Date: Tue, 20 Sep 2022 02:09:16 -0700
|
||||
Subject: [PATCH] fix do mask paths after parent mounted
|
||||
|
||||
Signed-off-by: Neil.wrz <wangrunze13@huawei.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 cd9e818..7f98811 100644
|
||||
--- a/src/lxc/conf.c
|
||||
+++ b/src/lxc/conf.c
|
||||
@@ -5164,13 +5164,6 @@ 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)) {
|
||||
@@ -5178,6 +5171,13 @@ int lxc_setup(struct lxc_handler *handler)
|
||||
}
|
||||
}
|
||||
|
||||
+ // 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) {
|
||||
if (!lxc_list_empty(&lxc_conf->mount_list)) {
|
||||
--
|
||||
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
|
||||
@ -55,6 +55,7 @@ Patch0044: 0044-fix-HOME-env-unset-error.patch
|
||||
Patch0045: 0045-only-set-user-or-image-set-non-empty-HOME.patch
|
||||
Patch0046: 0046-return-fail-if-no-args-or-no-rootfs-path-found.patch
|
||||
Patch0047: 0047-fix-tools-with-option-give-error-message.patch
|
||||
Patch0048: 0048-fix-do-mask-paths-after-parent-mounted.patch
|
||||
|
||||
BuildRequires: systemd-units git libtool graphviz docbook2X doxygen chrpath
|
||||
BuildRequires: pkgconfig(libseccomp)
|
||||
@ -226,6 +227,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 paths after parent mounted
|
||||
|
||||
* Fri Sep 02 2022 Neil.wrz<wangrunze13@huawei.com> - 4.0.3-2022090201
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
|
||||
@ -45,3 +45,4 @@
|
||||
0045-only-set-user-or-image-set-non-empty-HOME.patch
|
||||
0046-return-fail-if-no-args-or-no-rootfs-path-found.patch
|
||||
0047-fix-tools-with-option-give-error-message.patch
|
||||
0048-fix-do-mask-paths-after-parent-mounted.patch
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user