]> granicus.if.org Git - vim/commitdiff
patch 8.2.1818: SE Linux: deprecation warning for security_context_t v8.2.1818
authorBram Moolenaar <Bram@vim.org>
Fri, 9 Oct 2020 21:04:47 +0000 (23:04 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 9 Oct 2020 21:04:47 +0000 (23:04 +0200)
Problem:    SE Linux: deprecation warning for security_context_t.
Solution:   Use "char *" instead. (James McCoy, closes #7093)

src/os_unix.c
src/version.c

index 2afe1ba936e5c3f53a74e46a6db8c31dce04f9c1..40df6b727cac24b89e95f264a3d99bd7542bfb24 100644 (file)
@@ -2832,8 +2832,10 @@ mch_copy_sec(char_u *from_file, char_u *to_file)
 
     if (selinux_enabled > 0)
     {
-       security_context_t from_context = NULL;
-       security_context_t to_context = NULL;
+       // Use "char *" instead of "security_context_t" to avoid a deprecation
+       // warning.
+       char *from_context = NULL;
+       char *to_context = NULL;
 
        if (getfilecon((char *)from_file, &from_context) < 0)
        {
index 5adfd967868e3614f06482422b8f19264af30548..5fdfeeaf4ad9c2e8d5002915f87be25a40677b3b 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1818,
 /**/
     1817,
 /**/