diff options
author | jilles <jilles@FreeBSD.org> | 2013-08-23 13:59:47 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2013-08-23 13:59:47 +0000 |
commit | d2eb50cd0ca5fb81f2abdfd917bf5c0ce0fe9ac7 (patch) | |
tree | d650118b386b9cb389244a97e437c1de9f858ca2 /lib/libc/net/gethostbyht.c | |
parent | 6d81dda61eb6274ed572fd3fdecf93ea3d0c679f (diff) | |
download | FreeBSD-src-d2eb50cd0ca5fb81f2abdfd917bf5c0ce0fe9ac7.zip FreeBSD-src-d2eb50cd0ca5fb81f2abdfd917bf5c0ce0fe9ac7.tar.gz |
libc: Make various internal file descriptors from fopen() close-on-exec.
Diffstat (limited to 'lib/libc/net/gethostbyht.c')
-rw-r--r-- | lib/libc/net/gethostbyht.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/net/gethostbyht.c b/lib/libc/net/gethostbyht.c index 4253d49..1468afb 100644 --- a/lib/libc/net/gethostbyht.c +++ b/lib/libc/net/gethostbyht.c @@ -72,7 +72,7 @@ void _sethosthtent(int f, struct hostent_data *hed) { if (!hed->hostf) - hed->hostf = fopen(_PATH_HOSTS, "r"); + hed->hostf = fopen(_PATH_HOSTS, "re"); else rewind(hed->hostf); hed->stayopen = f; @@ -96,7 +96,7 @@ gethostent_p(struct hostent *he, struct hostent_data *hed, int mapped, int af, len; char hostbuf[BUFSIZ + 1]; - if (!hed->hostf && !(hed->hostf = fopen(_PATH_HOSTS, "r"))) { + if (!hed->hostf && !(hed->hostf = fopen(_PATH_HOSTS, "re"))) { RES_SET_H_ERRNO(statp, NETDB_INTERNAL); return (-1); } |