diff options
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/connection_edge.c | 4 | ||||
-rw-r--r-- | src/or/eventdns.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index c0329b9d7a..4e988bd04c 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) { diff --git a/src/or/eventdns.c b/src/or/eventdns.c index b929303fd5..0665cf53ec 100644 --- a/src/or/eventdns.c +++ b/src/or/eventdns.c @@ -3035,7 +3035,7 @@ evdns_resolv_conf_parse(int flags, const char *const filename) { log(EVDNS_LOG_DEBUG, "Parsing resolv.conf file %s", filename); - fd = open(filename, O_RDONLY); + fd = tor_open_cloexec(filename, O_RDONLY, 0); if (fd < 0) { evdns_resolv_set_defaults(flags); return 1; |