From a77dcfe35393eb6ef603676d8160f9a32a242c69 Mon Sep 17 00:00:00 2001 From: zhangxiaoyu Date: Tue, 26 Jul 2022 14:32:03 +0800 Subject: [PATCH] drop security_context_t Signed-off-by: zhangxiaoyu --- 0011-drop-security_context_t.patch | 29 +++++++++++++++++++++++++++++ lxc.spec | 9 ++++++++- series.conf | 1 + 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 0011-drop-security_context_t.patch diff --git a/0011-drop-security_context_t.patch b/0011-drop-security_context_t.patch new file mode 100644 index 0000000..b935b8b --- /dev/null +++ b/0011-drop-security_context_t.patch @@ -0,0 +1,29 @@ +From bcc3084c9230486c3a7d40cff633d581f6a1a990 Mon Sep 17 00:00:00 2001 +From: zhangxiaoyu +Date: Tue, 26 Jul 2022 14:27:11 +0800 +Subject: [PATCH] drop security_context_t + +Signed-off-by: zhangxiaoyu +--- + src/lxc/lsm/selinux.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/lxc/lsm/selinux.c b/src/lxc/lsm/selinux.c +index bd4f449..c24d238 100644 +--- a/src/lxc/lsm/selinux.c ++++ b/src/lxc/lsm/selinux.c +@@ -36,7 +36,11 @@ lxc_log_define(selinux, lsm); + */ + static char *selinux_process_label_get(pid_t pid) + { ++#ifdef HAVE_ISULAD ++ char *ctx; ++#else + security_context_t ctx; ++#endif + char *label; + + if (getpidcon_raw(pid, &ctx) < 0) { +-- +2.25.1 + diff --git a/lxc.spec b/lxc.spec index c371782..2eb0eed 100644 --- a/lxc.spec +++ b/lxc.spec @@ -1,4 +1,4 @@ -%global _release 2022072502 +%global _release 2022072601 Name: lxc Version: 4.0.3 @@ -18,6 +18,7 @@ Patch0007: 0007-refactor-patches-on-terminal.c-start.c-and-so-on.patch Patch0008: 0008-refactor-patch-code-of-json.patch Patch0009: 0009-fix-HOME-env-of-container-unset-error.patch Patch0010: 0010-check-yajl-only-when-have-isulad.patch +Patch0011: 0011-drop-security_context_t.patch BuildRequires: systemd-units git libtool graphviz docbook2X doxygen chrpath BuildRequires: pkgconfig(libseccomp) @@ -189,6 +190,12 @@ make check %{_mandir}/*/man7/%{name}* %changelog +* Tue Jul 26 2022 zhangxiaoyu - 4.0.3-2022072601 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC: drop security_context_t + * Mon Jul 25 2022 zhangxiaoyu - 4.0.3-2022072502 - Type:bugfix - ID:NA diff --git a/series.conf b/series.conf index 530ec36..aec8fff 100644 --- a/series.conf +++ b/series.conf @@ -8,3 +8,4 @@ 0008-refactor-patch-code-of-json.patch 0009-fix-HOME-env-of-container-unset-error.patch 0010-check-yajl-only-when-have-isulad.patch +0011-drop-security_context_t.patch -- Gitee