diff options
author | Florian Obser <florian@cvs.openbsd.org> | 2018-05-16 11:39:31 +0000 |
---|---|---|
committer | Florian Obser <florian@cvs.openbsd.org> | 2018-05-16 11:39:31 +0000 |
commit | a6265a707f22a90ee6c9db1375dc53bccf89c0ca (patch) | |
tree | b2f39b09c9de3214810e91aada0be1b0e0aeed8e /sbin/slaacd/frontend.c | |
parent | b082f2d7d83f8131450949fb56c112997dac4e78 (diff) |
Create all sockets with SOCK_CLOEXEC, we never want to hold on to them
over execve(2).
Diffstat (limited to 'sbin/slaacd/frontend.c')
-rw-r--r-- | sbin/slaacd/frontend.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/slaacd/frontend.c b/sbin/slaacd/frontend.c index 058832b374f..0d7f316a8a1 100644 --- a/sbin/slaacd/frontend.c +++ b/sbin/slaacd/frontend.c @@ -1,4 +1,4 @@ -/* $OpenBSD: frontend.c,v 1.14 2018/04/26 17:07:31 florian Exp $ */ +/* $OpenBSD: frontend.c,v 1.15 2018/05/16 11:39:30 florian Exp $ */ /* * Copyright (c) 2017 Florian Obser <florian@openbsd.org> @@ -141,7 +141,7 @@ frontend(int debug, int verbose) setproctitle("%s", log_procnames[slaacd_process]); log_procinit(log_procnames[slaacd_process]); - if ((ioctlsock = socket(AF_INET6, SOCK_DGRAM, 0)) < 0) + if ((ioctlsock = socket(AF_INET6, SOCK_DGRAM | SOCK_CLOEXEC, 0)) < 0) fatal("socket"); if (setgroups(1, &pw->pw_gid) || |