summaryrefslogtreecommitdiffstats
path: root/lib/libc/net/ether_addr.c
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2013-08-23 13:59:47 +0000
committerjilles <jilles@FreeBSD.org>2013-08-23 13:59:47 +0000
commitd2eb50cd0ca5fb81f2abdfd917bf5c0ce0fe9ac7 (patch)
treed650118b386b9cb389244a97e437c1de9f858ca2 /lib/libc/net/ether_addr.c
parent6d81dda61eb6274ed572fd3fdecf93ea3d0c679f (diff)
downloadFreeBSD-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/ether_addr.c')
-rw-r--r--lib/libc/net/ether_addr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/net/ether_addr.c b/lib/libc/net/ether_addr.c
index d769f27..5d72606 100644
--- a/lib/libc/net/ether_addr.c
+++ b/lib/libc/net/ether_addr.c
@@ -148,7 +148,7 @@ ether_ntohost(char *hostname, const struct ether_addr *e)
char *yp_domain;
#endif
- if ((fp = fopen(_PATH_ETHERS, "r")) == NULL)
+ if ((fp = fopen(_PATH_ETHERS, "re")) == NULL)
return (1);
while (fgets(buf,BUFSIZ,fp)) {
if (buf[0] == '#')
@@ -197,7 +197,7 @@ ether_hostton(const char *hostname, struct ether_addr *e)
char *yp_domain;
#endif
- if ((fp = fopen(_PATH_ETHERS, "r")) == NULL)
+ if ((fp = fopen(_PATH_ETHERS, "re")) == NULL)
return (1);
while (fgets(buf,BUFSIZ,fp)) {
if (buf[0] == '#')
OpenPOWER on IntegriCloud