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 #7093)
diff --git a/src/os_unix.c b/src/os_unix.c
index 2afe1ba..40df6b7 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -2832,8 +2832,10 @@
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)
{