From bdcd2b2d4a2d1cbac31c1e84315348b6e5f923cd Mon Sep 17 00:00:00 2001 From: "Neil.wrz" Date: Tue, 20 Sep 2022 01:59:19 -0700 Subject: [PATCH] fix do mask pathes after parent mounted Signed-off-by: Neil.wrz --- ...-do-mask-pathes-after-parent-mounted.patch | 44 +++++++++++++++++++ lxc.spec | 9 +++- series.conf | 1 + 3 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 0015-fix-do-mask-pathes-after-parent-mounted.patch 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 0000000..9243c49 --- /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 72e0392..e8d7143 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 6c2fe1a..7e0350d 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 -- Gitee