mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-23 20:03:31 +01:00
Merge branch 'sandbox-bwauth' into 'main'
fix sandbox for bandwidth authority Closes #40933 See merge request tpo/core/tor!821
This commit is contained in:
commit
7ce17c6c40
3
changes/bug40933
Normal file
3
changes/bug40933
Normal file
@ -0,0 +1,3 @@
|
||||
o Minor bugfixes (sandbox, bwauth):
|
||||
- Fix sandbox to work for bandwidth authority. Fixes bug 40933; bugfix on
|
||||
0.2.2.1-alpha
|
@ -926,6 +926,11 @@ sandbox_init_filter(void)
|
||||
OPEN_DATADIR("approved-routers");
|
||||
OPEN_DATADIR_SUFFIX("my-consensus-microdesc", ".tmp");
|
||||
OPEN_DATADIR_SUFFIX("my-consensus-ns", ".tmp");
|
||||
if (options->V3BandwidthsFile) {
|
||||
log_notice(LD_GENERAL, "Adding V3BandwidthsFile %s to sandboxing set.",
|
||||
options->V3BandwidthsFile);
|
||||
OPEN(options->V3BandwidthsFile);
|
||||
}
|
||||
}
|
||||
|
||||
if (options->ServerDNSResolvConfFile)
|
||||
|
@ -85,7 +85,8 @@ tor_open_cloexec(const char *path, int flags, unsigned mode)
|
||||
FILE *
|
||||
tor_fopen_cloexec(const char *path, const char *mode)
|
||||
{
|
||||
FILE *result = fopen(path, mode);
|
||||
const char *p = sandbox_intern_string(path);
|
||||
FILE *result = fopen(p, mode);
|
||||
#ifdef FD_CLOEXEC
|
||||
if (result != NULL) {
|
||||
if (fcntl(fileno(result), F_SETFD, FD_CLOEXEC) == -1) {
|
||||
|
Loading…
Reference in New Issue
Block a user