From 48b354e038eeaa0c4879275b4a539d4d52d49b4a Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Fri, 7 Jun 2024 19:29:52 +0200 Subject: fix sandbox for bandwidth authority --- src/lib/fs/files.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/lib/fs/files.c') diff --git a/src/lib/fs/files.c b/src/lib/fs/files.c index df59222913..914a8b8e72 100644 --- a/src/lib/fs/files.c +++ b/src/lib/fs/files.c @@ -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) { -- cgit v1.2.3-54-g00ecf