diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2020-10-28 08:58:39 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2020-12-10 13:28:07 +0200 |
commit | 3e6a832448802a2b0cd08e373ce197689d02cf60 (patch) | |
tree | c9858b39b63aad243747b93b1cc89f2d40e29087 | |
parent | 0ba349c2d307a2a9598aa533961b589361683626 (diff) | |
download | rpm-3e6a832448802a2b0cd08e373ce197689d02cf60.tar.gz |
Stop using deprecated security_context_t
In libselinux >= 3.1 these cause deprecation warnings on build.
security_context_t always was nothing but typedef to plain old "char *"
so just using that is entirely backwards compatible too.
(cherry picked from commit dd5c0446a3178fa6f4385284badb9d6f6c1342b3)
-rw-r--r-- | plugins/selinux.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/selinux.c b/plugins/selinux.c index 12545174d..7c1a0da8d 100644 --- a/plugins/selinux.c +++ b/plugins/selinux.c @@ -98,7 +98,7 @@ static rpmRC selinux_psm_pre(rpmPlugin plugin, rpmte te) static int setexecfilecon(const char *path, const char *fallback_type) { int rc = -1; - security_context_t mycon = NULL, fcon = NULL, newcon = NULL; + char *mycon = NULL, fcon = NULL, newcon = NULL; context_t con = NULL; /* Figure the context to for next exec() */ @@ -162,7 +162,7 @@ static rpmRC selinux_fsm_file_prepare(rpmPlugin plugin, rpmfi fi, rpmFileAction action = XFO_ACTION(op); if (sehandle && !XFA_SKIPPING(action)) { - security_context_t scon = NULL; + char *scon = NULL; if (selabel_lookup_raw(sehandle, &scon, dest, file_mode) == 0) { int conrc = lsetfilecon(path, scon); |