diff options
author | Daniel Pinto <danielpinto52@gmail.com> | 2021-04-07 23:46:59 +0100 |
---|---|---|
committer | anonym <anonym@riseup.net> | 2021-05-17 13:50:19 +0200 |
commit | e0a84546916bdf1ffb3058970eee5011484980f5 (patch) | |
tree | 0adc5b36f347519531b752c357f86c22978b4c69 /src/app/config/config.h | |
parent | ce8d6d143c7a33d6dccf0cc6181f9045091c9156 (diff) | |
download | tor-e0a84546916bdf1ffb3058970eee5011484980f5.tar.gz tor-e0a84546916bdf1ffb3058970eee5011484980f5.zip |
Make SAVECONF keep only one backup and add sandbox rules for it. #40317
When seccomp sandbox is active, SAVECONF failed because it was not
able to save the backup files for torrc. This commit simplifies
the implementation of SAVECONF and sandbox by making it keep only
one backup of the configuration file.
Diffstat (limited to 'src/app/config/config.h')
-rw-r--r-- | src/app/config/config.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/app/config/config.h b/src/app/config/config.h index e95ef4a728..ee78d1e0f7 100644 --- a/src/app/config/config.h +++ b/src/app/config/config.h @@ -44,6 +44,9 @@ int get_protocol_warning_severity_level(void); #define LOG_PROTOCOL_WARN (get_protocol_warning_severity_level()) +/** Pattern for backing up configuration files */ +#define CONFIG_BACKUP_PATTERN "%s.orig.1" + /** An error from options_trial_assign() or options_init_from_string(). */ typedef enum setopt_err_t { SETOPT_OK = 0, |