Open /etc/resolv.conf with FD_CLOEXEC
authorRoss Lagerwall <rosslagerwall@gmail.com>
Sat, 17 Dec 2011 19:43:40 +0000 (14:43 -0500)
committerUlrich Drepper <drepper@gmail.com>
Sat, 17 Dec 2011 19:43:40 +0000 (14:43 -0500)
ChangeLog
resolv/res_init.c

index 19f2cde6b0156d3f7e2612c420975c0839391faa..7c5ac8d49e109ecd7f3d743262d6f06781b47929 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-11-21  Ross Lagerwall  <rosslagerwall@gmail.com>
+
+       * resolv/res_init.c (__res_vinit): Open /etc/resolv.conf with
+       FD_CLOEXEC.
+
 2011-11-14  Liubov Dmitrieva  <liubov.dmitrieva@gmail.com>
 
        * sysdeps/x86_64/multiarch/Makefile [subdir=wcsmbs] (sysdep_routines):
index 73caaa4c5ea7c2de253e6a4cfd72f0d2a7e8619a..c58c76384133acb5af3c061925cd5f44ce2b4da8 100644 (file)
@@ -233,7 +233,7 @@ __res_vinit(res_state statp, int preinit) {
        (line[sizeof(name) - 1] == ' ' || \
         line[sizeof(name) - 1] == '\t'))
 
-       if ((fp = fopen(_PATH_RESCONF, "rc")) != NULL) {
+       if ((fp = fopen(_PATH_RESCONF, "rce")) != NULL) {
            /* No threads use this stream.  */
            __fsetlocking (fp, FSETLOCKING_BYCALLER);
            /* read the config file */