DBG("opening %s custom baud %lu", uart_dev_name, baud_rate);
- uart_fd = open(uart_dev_name, O_RDWR);
+ uart_fd = open(uart_dev_name, O_RDWR | O_CLOEXEC);
if (uart_fd < 0)
return -EIO;
return err;
}
- fd = open(TIST_SYSFS_INSTALL, O_RDONLY);
+ fd = open(TIST_SYSFS_INSTALL, O_RDONLY | O_CLOEXEC);
if (fd < 0) {
connman_error("Failed to open TI ST sysfs install file");
return -EIO;
ifr.ifr_flags = IFF_TUN | IFF_NO_PI;
sprintf(ifr.ifr_name, "%s", tun_name);
- fd = open("/dev/net/tun", O_RDWR);
+ fd = open("/dev/net/tun", O_RDWR | O_CLOEXEC);
if (fd < 0) {
err = -errno;
connman_error("Failed to open /dev/net/tun to device %s: %s",
name = connman_provider_get_driver_name(provider);
vpn_driver_data = g_hash_table_lookup(driver_hash, name);
- fd = open("/dev/net/tun", O_RDWR);
+ fd = open("/dev/net/tun", O_RDWR | O_CLOEXEC);
if (fd < 0) {
i = -errno;
connman_error("Failed to open /dev/net/tun: %s",