aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAndrea Claudi <aclaudi@redhat.com>2023-08-23 19:30:02 +0200
committerDavid Ahern <dsahern@kernel.org>2023-08-24 17:34:40 -0700
commit0d0eeaa6cb9218e57ce910fc3a8991b80da6393e (patch)
tree28f4248a666c6c43f096646892cc9db2144c45ec /include
parente246ebc3b7f1f438310ad6fd1d5976ba6ccf7a69 (diff)
downloadiproute2-0d0eeaa6cb9218e57ce910fc3a8991b80da6393e.tar.gz
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>
Diffstat (limited to 'include')
-rw-r--r--include/selinux.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/selinux.h b/include/selinux.h
index 499aa966a..592c76808 100644
--- a/include/selinux.h
+++ b/include/selinux.h
@@ -6,4 +6,5 @@ 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