!57 lxc: using string type instead of security_context_t

From: @jingwoo
Reviewed-by: @duguhaotian
Signed-off-by: @duguhaotian
This commit is contained in:
openeuler-ci-bot 2020-09-25 17:01:41 +08:00 committed by Gitee
commit 9b1c476e84
2 changed files with 35 additions and 1 deletions

View File

@ -0,0 +1,27 @@
From 5a8c9b52ad3291feb87c2281e074b2c85c766245 Mon Sep 17 00:00:00 2001
From: wujing <wujing50@huawei.com>
Date: Fri, 25 Sep 2020 10:21:37 +0800
Subject: [PATCH] Using string type instead of security_context_t because it is
deprecated
Signed-off-by: wujing <wujing50@huawei.com>
---
src/lxc/lsm/selinux.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lxc/lsm/selinux.c b/src/lxc/lsm/selinux.c
index 837a3da3..79697c58 100644
--- a/src/lxc/lsm/selinux.c
+++ b/src/lxc/lsm/selinux.c
@@ -36,7 +36,7 @@ lxc_log_define(selinux, lsm);
*/
static char *selinux_process_label_get(pid_t pid)
{
- security_context_t ctx;
+ char *ctx;
char *label;
if (getpidcon_raw(pid, &ctx) < 0) {
--
2.25.1

View File

@ -1,4 +1,4 @@
%global _release 2020091101
%global _release 2020092501
Name: lxc
Version: 4.0.3
@ -13,6 +13,7 @@ Patch9003: 0003-format-code-and-verify-mount-mode.patch
Patch9004: 0004-Removes-the-definition-of-the-thread-attributes-obje.patch
Patch9005: 0005-solve-coredump-bug-caused-by-fstype-being-NULL-durin.patch
Patch9006: 0006-SIGTERM-do-not-catch-signal-SIGTERM-in-lxc-monitor.patch
Patch9007: 0007-Using-string-type-instead-of-security_context_t-beca.patch
BuildRequires: systemd-units git libtool graphviz docbook2X doxygen chrpath
BuildRequires: pkgconfig(libseccomp)
@ -184,6 +185,12 @@ make check
%{_mandir}/*/man7/%{name}*
%changelog
* Fri Sep 25 2020 openEuler Buildteam <buildteam@openeuler.org> - 4.0.3-2020092501
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: Code optimization
* Fri Sep 11 2020 openEuler Buildteam <buildteam@openeuler.org> - 4.0.3-2020091101
- Type:enhancement
- ID:NA