diff --git a/0015-fix-do-mask-pathes-after-parent-mounted.patch b/0015-fix-do-mask-pathes-after-parent-mounted.patch new file mode 100644 index 0000000000000000000000000000000000000000..9243c493eb915ffadbaf429fcb8e33f821678848 --- /dev/null +++ b/0015-fix-do-mask-pathes-after-parent-mounted.patch @@ -0,0 +1,44 @@ +From 96a35e077d21a1abf1cc3819fb842b8089ee268d Mon Sep 17 00:00:00 2001 +From: isuladci +Date: Tue, 20 Sep 2022 01:40:18 -0700 +Subject: [PATCH] fix do mask pathes after parent mounted + +Signed-off-by: isuladci +--- + 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 + diff --git a/lxc.spec b/lxc.spec index 72e03923d02692a3499171a0f2258a1f9edf2dc2..e8d7143302b6056b52af2b5f7833573e7c11af62 100644 --- a/lxc.spec +++ b/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 - 4.0.3-2022092001 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC: do mask pathes after parent mounted + * Fri Sep 2 2022 Neil.wrz - 4.0.3-2022090201 - Type:bugfix - ID:NA diff --git a/series.conf b/series.conf index 6c2fe1a3eb770272e6aca0ddc611e4d47fb4c158..7e0350d7fb4e1b6bec96f42b32c88b27561d469a 100644 --- a/series.conf +++ b/series.conf @@ -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