libvirt/SOURCES/libvirt-security-make-args-to-virSecuritySELinuxContextAddRange-const.patch

40 lines
1.3 KiB
Diff
Raw Normal View History

2023-05-09 05:17:35 +00:00
From d1aa4fb37896b2abb92b4d0e0409459820e726a4 Mon Sep 17 00:00:00 2001
Message-Id: <d1aa4fb37896b2abb92b4d0e0409459820e726a4@dist-git>
From: Laine Stump <laine@redhat.com>
Date: Wed, 8 Mar 2023 12:50:38 -0500
Subject: [PATCH] security: make args to virSecuritySELinuxContextAddRange()
const
Neither of these are modified anywhere in the function, and the
function will soon be called with an arg that actually is a const.
Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit 60afe39576abc9b26f5f8c1dfed39bbc783fb78c)
https://bugzilla.redhat.com/2172267
Signed-off-by: Laine Stump <laine@redhat.com>
---
src/security/security_selinux.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c
index 4d4a1705e6..a0b3a5e147 100644
--- a/src/security/security_selinux.c
+++ b/src/security/security_selinux.c
@@ -523,8 +523,8 @@ virSecuritySELinuxMCSGetProcessRange(char **sens,
}
static char *
-virSecuritySELinuxContextAddRange(char *src,
- char *dst)
+virSecuritySELinuxContextAddRange(const char *src,
+ const char *dst)
{
const char *str = NULL;
char *ret = NULL;
--
2.40.0