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:
parent
8967f29169
commit
163a035aa6
@ -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");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user