From: Lennart Poettering Date: Thu, 2 Aug 2018 17:10:01 +0000 (+0200) Subject: networkd: add O_CLOEXEC where it's missing X-Git-Tag: v240~823^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=163a035aa654aa16b5d26f6436b13b94fc75b3f2;p=thirdparty%2Fsystemd.git networkd: add O_CLOEXEC where it's missing --- 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");