comparison src/os_unix.c @ 22539:0f205ff4a0fd v8.2.1818

patch 8.2.1818: SE Linux: deprecation warning for security_context_t Commit: https://github.com/vim/vim/commit/8956023920bb1b6f9c381739e59b9ddab4bf7798 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Oct 9 23:04:47 2020 +0200 patch 8.2.1818: SE Linux: deprecation warning for security_context_t Problem: SE Linux: deprecation warning for security_context_t. Solution: Use "char *" instead. (James McCoy, closes https://github.com/vim/vim/issues/7093)
author Bram Moolenaar <Bram@vim.org>
date Fri, 09 Oct 2020 23:15:04 +0200
parents d0dd03c04140
children fa0aac214da6
comparison
equal deleted inserted replaced
22538:79366811bc71 22539:0f205ff4a0fd
2830 if (selinux_enabled == -1) 2830 if (selinux_enabled == -1)
2831 selinux_enabled = is_selinux_enabled(); 2831 selinux_enabled = is_selinux_enabled();
2832 2832
2833 if (selinux_enabled > 0) 2833 if (selinux_enabled > 0)
2834 { 2834 {
2835 security_context_t from_context = NULL; 2835 // Use "char *" instead of "security_context_t" to avoid a deprecation
2836 security_context_t to_context = NULL; 2836 // warning.
2837 char *from_context = NULL;
2838 char *to_context = NULL;
2837 2839
2838 if (getfilecon((char *)from_file, &from_context) < 0) 2840 if (getfilecon((char *)from_file, &from_context) < 0)
2839 { 2841 {
2840 // If the filesystem doesn't support extended attributes, 2842 // If the filesystem doesn't support extended attributes,
2841 // the original had no special security context and the 2843 // the original had no special security context and the