aboutsummaryrefslogtreecommitdiff
path: root/src/lib/sandbox/sandbox.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-11-12 11:55:55 -0500
committerNick Mathewson <nickm@torproject.org>2020-11-12 11:55:55 -0500
commitdbc8d2a4e476c06f59db3ff79b66afc8bc4ea27c (patch)
treea121f0acd9193829ba57dbc3075495807f46e3ca /src/lib/sandbox/sandbox.h
parente2d3c9c5f82a1369385dd99765c31ba479ba8f23 (diff)
downloadtor-dbc8d2a4e476c06f59db3ff79b66afc8bc4ea27c.tar.gz
tor-dbc8d2a4e476c06f59db3ff79b66afc8bc4ea27c.zip
When handling includes, detect missing interned strings earlier.
There were three separate places where we were hitting a sandbox Bug warning before we actually exited. Fixes #40094; bugfix on 0.3.1.1-alpha when %includes were introduced.
Diffstat (limited to 'src/lib/sandbox/sandbox.h')
-rw-r--r--src/lib/sandbox/sandbox.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/sandbox/sandbox.h b/src/lib/sandbox/sandbox.h
index a2b3227b90..eba99afbde 100644
--- a/src/lib/sandbox/sandbox.h
+++ b/src/lib/sandbox/sandbox.h
@@ -104,12 +104,11 @@ typedef struct {
#endif /* defined(USE_LIBSECCOMP) */
#ifdef USE_LIBSECCOMP
-/** Returns a registered protected string used with the sandbox, given that
- * it matches the parameter.
- */
const char* sandbox_intern_string(const char *param);
+bool sandbox_interned_string_is_missing(const char *s);
#else /* !defined(USE_LIBSECCOMP) */
#define sandbox_intern_string(s) (s)
+#define sandbox_interned_string_is_missing(s) (false)
#endif /* defined(USE_LIBSECCOMP) */
/** Creates an empty sandbox configuration file.*/