Selinux complains about deprecated selinux/flask.h, stop including it
authorDenys Vlasenko <vda.linux@googlemail.com>
Fri, 23 Dec 2016 12:52:13 +0000 (13:52 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sun, 1 Jan 2017 12:01:04 +0000 (13:01 +0100)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
loginutils/login.c
selinux/runcon.c

index 52abc18868eab8eeccd724a2f2d833038a20721f..3ca8213bb98b6efe09d04f8f23d4535c33a843f1 100644 (file)
@@ -69,7 +69,9 @@
 #if ENABLE_SELINUX
 # include <selinux/selinux.h>  /* for is_selinux_enabled()  */
 # include <selinux/get_context_list.h> /* for get_default_context() */
-# include <selinux/flask.h> /* for security class definitions  */
+# /* from deprecated <selinux/flask.h>: */
+# undef  SECCLASS_CHR_FILE
+# define SECCLASS_CHR_FILE 10
 #endif
 
 #if ENABLE_PAM
index 366834e46de67637a5de9dbaba7baaf6ea54a589..16f17110141d01836fb2bfdf8b43f0ae3b6197c7 100644 (file)
@@ -68,7 +68,9 @@
 //usage:       )
 
 #include <selinux/context.h>
-#include <selinux/flask.h>
+/* from deprecated <selinux/flask.h>: */
+#undef  SECCLASS_PROCESS
+#define SECCLASS_PROCESS 2
 
 #include "libbb.h"