diff options
author | Daniel Wagner <daniel.wagner@bmw-carit.de> | 2011-10-23 14:16:25 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2011-10-25 13:34:51 +0200 |
commit | c94b607044db60e5ff6a4b0a861a90bee35b3bc0 (patch) | |
tree | 09d8a4eb547fe5e908127444d14613106a4c8fb7 /src/resolver.c | |
parent | bd972fef32de3560bbe23ef41ba2281b696764fd (diff) | |
download | connman-c94b607044db60e5ff6a4b0a861a90bee35b3bc0.tar.gz connman-c94b607044db60e5ff6a4b0a861a90bee35b3bc0.tar.bz2 connman-c94b607044db60e5ff6a4b0a861a90bee35b3bc0.zip |
core: Add O_CLOEXEC to open()
Make sure all file descriptor are closed.
Diffstat (limited to 'src/resolver.c')
-rw-r--r-- | src/resolver.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/resolver.c b/src/resolver.c index 59defd49..4cc87ddc 100644 --- a/src/resolver.c +++ b/src/resolver.c @@ -121,7 +121,7 @@ static int resolvfile_export(void) old_umask = umask(022); - fd = open("/etc/resolv.conf", O_RDWR | O_CREAT, + fd = open("/etc/resolv.conf", O_RDWR | O_CREAT | O_CLOEXEC, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); if (fd < 0) { err = -errno; |