X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Ftincctl.c;h=a0a0281023eed94d00095fa5244c5d41ce3dc275;hb=4436af55e55e79b496264fe114039fbc1198d71f;hp=afe19cd2da1b856c526d29a38ea6ed5713e568a6;hpb=bc4df95a48857aa4ab65fb47eabd48c48d650ca0;p=tinc diff --git a/src/tincctl.c b/src/tincctl.c index afe19cd2..a0a02810 100644 --- a/src/tincctl.c +++ b/src/tincctl.c @@ -41,6 +41,7 @@ #include "subnet.h" #include "keys.h" #include "random.h" +#include "sandbox.h" #include "pidfile.h" #include "console.h" @@ -119,6 +120,9 @@ static void version(void) { #endif #ifndef DISABLE_LEGACY " legacy_protocol" +#endif +#ifdef HAVE_SANDBOX + " sandbox" #endif "\n\n" "Copyright (C) 1998-2018 Ivo Timmermans, Guus Sliepen and others.\n" @@ -1695,6 +1699,7 @@ const var_t variables[] = { {"ProcessPriority", VAR_SERVER}, {"Proxy", VAR_SERVER}, {"ReplayWindow", VAR_SERVER | VAR_SAFE}, + {"Sandbox", VAR_SERVER}, {"ScriptsExtension", VAR_SERVER}, {"ScriptsInterpreter", VAR_SERVER}, {"StrictSubnets", VAR_SERVER | VAR_SAFE}, @@ -3350,6 +3355,9 @@ int main(int argc, char *argv[]) { crypto_init(); prng_init(); + sandbox_set_level(SANDBOX_NORMAL); + sandbox_enter(); + int result = run_command(argc, argv); random_exit();