diff --git a/0048-fix-do-mask-paths-after-parent-mounted.patch b/0048-fix-do-mask-paths-after-parent-mounted.patch new file mode 100644 index 0000000000000000000000000000000000000000..0f1e3d89337158d7b15269ed87a616b701f1c971 --- /dev/null +++ b/0048-fix-do-mask-paths-after-parent-mounted.patch @@ -0,0 +1,45 @@ +From d349251fa2e05b111b230a78f782c2552095adf5 Mon Sep 17 00:00:00 2001 +From: "Neil.wrz" +Date: Tue, 20 Sep 2022 02:09:16 -0700 +Subject: [PATCH] fix do mask paths after parent mounted + +Signed-off-by: Neil.wrz +--- + 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 + diff --git a/lxc.spec b/lxc.spec index 463c543397ed50824d5a84ec3fa804813e52e54f..04f66833f11c0e1c5f3595fc32450aaaaf86dd6f 100644 --- a/lxc.spec +++ b/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 - 4.0.3-2022092001 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC: do mask paths after parent mounted + * Fri Sep 02 2022 Neil.wrz - 4.0.3-2022090201 - Type:bugfix - ID:NA diff --git a/series.conf b/series.conf index 8a8ec181374458913f4fbb1eb4b7a24b862583c3..4b4e5c036adf4b74a1693fba828840bd93d7e0f3 100644 --- a/series.conf +++ b/series.conf @@ -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