summaryrefslogtreecommitdiff
path: root/src/inet.c
diff options
context:
space:
mode:
authorDaniel Wagner <daniel.wagner@bmw-carit.de>2011-10-23 12:16:25 (GMT)
committerMarcel Holtmann <marcel@holtmann.org>2011-10-25 11:34:51 (GMT)
commitc94b607044db60e5ff6a4b0a861a90bee35b3bc0 (patch)
tree09d8a4eb547fe5e908127444d14613106a4c8fb7 /src/inet.c
parentbd972fef32de3560bbe23ef41ba2281b696764fd (diff)
downloadconnman-c94b607044db60e5ff6a4b0a861a90bee35b3bc0.zip
connman-c94b607044db60e5ff6a4b0a861a90bee35b3bc0.tar.gz
connman-c94b607044db60e5ff6a4b0a861a90bee35b3bc0.tar.bz2
core: Add O_CLOEXEC to open()
Make sure all file descriptor are closed.
Diffstat (limited to 'src/inet.c')
-rw-r--r--src/inet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/inet.c b/src/inet.c
index 56f29fd..f7f72b8 100644
--- a/src/inet.c
+++ b/src/inet.c
@@ -1379,7 +1379,7 @@ int connman_inet_create_tunnel(char **iface)
struct ifreq ifr;
int i, fd;
- 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",