1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-10-27 18:55:09 +03:00

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

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