networkd: add O_CLOEXEC where it's missing

This commit is contained in:
Lennart Poettering 2018-08-02 19:10:01 +02:00 committed by Zbigniew Jędrzejewski-Szmek
parent 8967f29169
commit 163a035aa6
1 changed files with 1 additions and 1 deletions

View File

@ -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");