Projects
openEuler:24.03:SP1:Everything
rpm
_service:tar_scm:rpm-selinux-plugin-check-conte...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:rpm-selinux-plugin-check-context-file-exist.patch of Package rpm
From 55708fd5822a3e4bf5537002a648f32cb0a6e07e Mon Sep 17 00:00:00 2001 From: luhuaxin <1539327763@qq.com> Date: Tue, 26 Oct 2021 18:39:46 +0800 Subject: [PATCH] rpm selinux plugin check context file exist --- plugins/selinux.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/selinux.c b/plugins/selinux.c index 1254517..fb8b7a2 100644 --- a/plugins/selinux.c +++ b/plugins/selinux.c @@ -63,7 +63,8 @@ static rpmRC selinux_tsm_pre(rpmPlugin plugin, rpmts ts) rpmRC rc = RPMRC_OK; /* If SELinux isn't enabled on the system, dont mess with it */ - if (!is_selinux_enabled()) { + if (!is_selinux_enabled() || selinux_file_context_path() == NULL || + access(selinux_file_context_path(), F_OK)) { rpmtsSetFlags(ts, (rpmtsFlags(ts) | RPMTRANS_FLAG_NOCONTEXTS)); } -- 2.23.0
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2