mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
maint: avoid deprecation warning with <selinux/flask.h>
* src/runcon.c (main): As per the compile time warning from libselinux-2.4-3, lookup the class with string_to_security_class(), rather than using defines from flask.h.
This commit is contained in:
1 parent
dee6b76010
commit
50e61bfdb9
1 file changed
+2
-6
+2
-6
@@ -45,11 +45,6 @@
|
||||
#include <getopt.h>
|
||||
#include <selinux/selinux.h>
|
||||
#include <selinux/context.h>
|
||||
#ifdef HAVE_SELINUX_FLASK_H
|
||||
# include <selinux/flask.h>
|
||||
#else
|
||||
# define SECCLASS_PROCESS 0
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#include "system.h"
|
||||
#include "error.h"
|
||||
@@ -222,7 +217,8 @@ main (int argc, char **argv)
|
||||
quote (argv[optind]));
|
||||
/* compute result of process transition */
|
||||
if (security_compute_create (cur_context, file_context,
|
||||
SECCLASS_PROCESS, &new_context) != 0)
|
||||
string_to_security_class ("process"),
|
||||
&new_context) != 0)
|
||||
error (EXIT_FAILURE, errno, _("failed to compute a new context"));
|
||||
/* free contexts */
|
||||
freecon (file_context);
|
||||
|
||||
Reference in new issue
Block a user