From 163a035aa654aa16b5d26f6436b13b94fc75b3f2 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 2 Aug 2018 19:10:01 +0200 Subject: [PATCH] networkd: add O_CLOEXEC where it's missing --- src/network/netdev/tuntap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network/netdev/tuntap.c b/src/network/netdev/tuntap.c index 47c56cfd70f..c97478b2a46 100644 --- a/src/network/netdev/tuntap.c +++ b/src/network/netdev/tuntap.c @@ -60,7 +60,7 @@ static int netdev_tuntap_add(NetDev *netdev, struct ifreq *ifr) { assert(netdev); assert(ifr); - fd = open(TUN_DEV, O_RDWR); + fd = open(TUN_DEV, O_RDWR|O_CLOEXEC); if (fd < 0) return log_netdev_error_errno(netdev, -errno, "Failed to open tun dev: %m");