1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-06 16:59:03 +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(netdev);
assert(ifr); assert(ifr);
fd = open(TUN_DEV, O_RDWR); fd = open(TUN_DEV, O_RDWR|O_CLOEXEC);
if (fd < 0) if (fd < 0)
return log_netdev_error_errno(netdev, -errno, "Failed to open tun dev: %m"); return log_netdev_error_errno(netdev, -errno, "Failed to open tun dev: %m");