diff options
author | Nick Mathewson <nickm@torproject.org> | 2010-11-20 00:58:33 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2010-11-20 00:58:40 -0500 |
commit | 5a66de7015d32e723f13171b622a8dabcef05126 (patch) | |
tree | d3a6490a26b7d2c60273d10fcf9a1feaaa8da1cf /src/or/connection_edge.c | |
parent | e361de80bbca479a68345a3e0db4243da00e5e38 (diff) | |
download | tor-5a66de7015d32e723f13171b622a8dabcef05126.tar tor-5a66de7015d32e723f13171b622a8dabcef05126.tar.gz |
Initial work to set CLOEXEC on all possible fds
Still to go: some pipes, all stdio files.
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r-- | src/or/connection_edge.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index c0329b9d7..4e988bd04 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -1752,10 +1752,10 @@ get_pf_socket(void) #ifdef OPENBSD /* only works on OpenBSD */ - pf = open("/dev/pf", O_RDONLY); + pf = tor_open_cloexec("/dev/pf", O_RDONLY, 0); #else /* works on NetBSD and FreeBSD */ - pf = open("/dev/pf", O_RDWR); + pf = tor_open_cloexec("/dev/pf", O_RDWR, 0); #endif if (pf < 0) { |