summaryrefslogtreecommitdiff
path: root/sbin/slaacd/frontend.c
diff options
context:
space:
mode:
authorFlorian Obser <florian@cvs.openbsd.org>2018-05-16 11:39:31 +0000
committerFlorian Obser <florian@cvs.openbsd.org>2018-05-16 11:39:31 +0000
commita6265a707f22a90ee6c9db1375dc53bccf89c0ca (patch)
treeb2f39b09c9de3214810e91aada0be1b0e0aeed8e /sbin/slaacd/frontend.c
parentb082f2d7d83f8131450949fb56c112997dac4e78 (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.c4
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) ||