From: Kirill Isakov Date: Wed, 23 Mar 2022 09:22:05 +0000 (+0600) Subject: Rearrange conflicting tincd globals X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=commitdiff_plain;h=42fb71b07973371818b428de0b9d5527012b2f0b Rearrange conflicting tincd globals --- diff --git a/src/process.c b/src/process.c index 7d528f7e..7deaadfc 100644 --- a/src/process.c +++ b/src/process.c @@ -33,8 +33,12 @@ bool do_detach = true; extern char **g_argv; -extern bool use_logfile; -extern bool use_syslog; + +/* If nonzero, use syslog instead of stderr in no-detach mode. */ +bool use_syslog = false; + +/* If nonzero, write log entries to a separate file. */ +bool use_logfile = false; /* Some functions the less gifted operating systems might lack... */ diff --git a/src/process.h b/src/process.h index 5849752c..1aae6dea 100644 --- a/src/process.h +++ b/src/process.h @@ -24,6 +24,8 @@ #include "system.h" extern bool do_detach; +extern bool use_logfile; +extern bool use_syslog; extern bool detach(void); diff --git a/src/protocol_auth.c b/src/protocol_auth.c index 02b7399c..0049cd93 100644 --- a/src/protocol_auth.c +++ b/src/protocol_auth.c @@ -46,6 +46,9 @@ #include "ed25519/sha512.h" #include "keys.h" +/* If nonzero, use null ciphers and skip all key exchanges. */ +bool bypass_security = false; + int invitation_lifetime; ecdsa_t *invitation_key = NULL; diff --git a/src/tincd.c b/src/tincd.c index 4310181c..1ee8769f 100644 --- a/src/tincd.c +++ b/src/tincd.c @@ -61,9 +61,6 @@ static bool show_help = false; /* If nonzero, print the version on standard output and exit. */ static bool show_version = false; -/* If nonzero, use null ciphers and skip all key exchanges. */ -bool bypass_security = false; - #ifdef HAVE_MLOCKALL /* If nonzero, disable swapping for this process. */ static bool do_mlock = false; @@ -77,12 +74,6 @@ static bool do_chroot = false; static const char *switchuser = NULL; #endif -/* If nonzero, write log entries to a separate file. */ -bool use_logfile = false; - -/* If nonzero, use syslog instead of stderr in no-detach mode. */ -bool use_syslog = false; - char **g_argv; /* a copy of the cmdline arguments */ static int status = 1;