X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fscript.c;h=2f2c30bf51a87f22739c8a9a78ff921273943753;hb=4436af55e55e79b496264fe114039fbc1198d71f;hp=3f44bf9fc9eb07f2b6434665011ff2600e441978;hpb=bc4df95a48857aa4ab65fb47eabd48c48d650ca0;p=tinc diff --git a/src/script.c b/src/script.c index 3f44bf9f..2f2c30bf 100644 --- a/src/script.c +++ b/src/script.c @@ -26,6 +26,7 @@ #include "names.h" #include "script.h" #include "xalloc.h" +#include "sandbox.h" #ifdef HAVE_PUTENV static void unputenv(const char *p) { @@ -141,6 +142,10 @@ void environment_exit(environment_t *env) { } bool execute_script(const char *name, environment_t *env) { + if(!sandbox_can(START_PROCESSES, RIGHT_NOW)) { + return false; + } + char scriptname[PATH_MAX]; char *command;