Use the sandbox in tor_open_cloexec, whether or not O_CLOEXEC is defined.
Patch by "teor". Fix on 0.2.3.1-alpha.
--- /dev/null
+ o Minor fixes (sandbox, files):
+ - Use the sandbox in tor_open_cloexec whether or not O_CLOEXEC is defined.
+ Patch by "teor". Fix on 0.2.3.1-alpha.
tor_open_cloexec(const char *path, int flags, unsigned mode)
{
int fd;
- const char *p = path;
+ const char *p = sandbox_intern_string(path);
#ifdef O_CLOEXEC
- p = sandbox_intern_string(path);
fd = open(p, flags|O_CLOEXEC, mode);
if (fd >= 0)
return fd;