From 986217bc3386e30c2026a9845259e228a165ef84 Mon Sep 17 00:00:00 2001 From: steven_q Date: Sat, 5 Mar 2022 13:39:26 +0800 Subject: [PATCH] getpidcon return wrong context, if setcon before Signed-off-by: steven_q Change-Id: I39c17a1149bfb4f69edec56d63e637ed0498a3de --- libselinux/src/procattr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libselinux/src/procattr.c b/libselinux/src/procattr.c index 84057052..ca7f9786 100644 --- a/libselinux/src/procattr.c +++ b/libselinux/src/procattr.c @@ -126,7 +126,7 @@ static int getprocattrcon_raw(char ** context, switch (attr[0]) { case 'c': - prev_context = prev_current; + prev_context = NULL; break; case 'e': prev_context = prev_exec; -- Gitee