mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Always use the sandbox in tor_open_cloexec
Use the sandbox in tor_open_cloexec, whether or not O_CLOEXEC is defined. Patch by "teor". Fix on 0.2.3.1-alpha.
This commit is contained in:
parent
19440b9e58
commit
57c61f39a0
3
changes/bug16515-sandbox-cloexec
Normal file
3
changes/bug16515-sandbox-cloexec
Normal file
@ -0,0 +1,3 @@
|
||||
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.
|
@ -150,9 +150,8 @@ int
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user