iproute2/include/selinux.h
Andrea Claudi 0d0eeaa6cb ip vrf: make ipvrf_exec SELinux-aware
When using ip vrf and SELinux is enabled, make sure to set the exec file
context before calling cmd_exec.

This ensures that the command is executed with the right context,
falling back to the ifconfig_t context when needed.

Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
2023-08-24 17:34:40 -07:00

11 lines
348 B
C

#if HAVE_SELINUX
#include <selinux/selinux.h>
#else
int is_selinux_enabled(void);
void freecon(char *context);
int getpidcon(pid_t pid, char **context);
int getfilecon(const char *path, char **context);
int security_get_initial_context(const char *name, char **context);
int setexecfilecon(const char *filename, const char *fallback_type);
#endif