]> xenbits.xensource.com Git - libvirt.git/commitdiff
selinux: Reflect context_str() type change
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 29 Nov 2022 09:49:07 +0000 (10:49 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 29 Nov 2022 14:23:16 +0000 (15:23 +0100)
As of [1]. libselinux changed the type of context_str() - it now
returns a const string. Follow this change in our code base.

1: https://github.com/SELinuxProject/selinux/commit/dd98fa322766760c4e1f029cf19d2515a583304f

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/security/security_selinux.c

index 1f72f61cacdfa91fb2ad7c7df8180dfbb01aacbe..92e85c92e075f33de7ee98803c1e4d0ce54d1ad3 100644 (file)
@@ -526,7 +526,7 @@ static char *
 virSecuritySELinuxContextAddRange(char *src,
                                   char *dst)
 {
-    char *str = NULL;
+    const char *str = NULL;
     char *ret = NULL;
     context_t srccon = NULL;
     context_t dstcon = NULL;
@@ -567,7 +567,7 @@ virSecuritySELinuxGenNewContext(const char *basecontext,
 {
     context_t context = NULL;
     char *ret = NULL;
-    char *str;
+    const char *str;
     char *ourSecContext = NULL;
     context_t ourContext = NULL;