summaryrefslogtreecommitdiffstats
path: root/lib/libc/net
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/net')
-rw-r--r--lib/libc/net/ether_addr.c4
-rw-r--r--lib/libc/net/eui64.c4
-rw-r--r--lib/libc/net/getaddrinfo.c4
-rw-r--r--lib/libc/net/gethostbyht.c4
-rw-r--r--lib/libc/net/getnetbyht.c4
-rw-r--r--lib/libc/net/getprotoent.c4
-rw-r--r--lib/libc/net/getservent.c4
-rw-r--r--lib/libc/net/hesiod.c2
-rw-r--r--lib/libc/net/nsdispatch.c2
-rw-r--r--lib/libc/net/rcmd.c4
10 files changed, 18 insertions, 18 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] == '#')
diff --git a/lib/libc/net/eui64.c b/lib/libc/net/eui64.c
index 5085167..d9ed76c 100644
--- a/lib/libc/net/eui64.c
+++ b/lib/libc/net/eui64.c
@@ -227,7 +227,7 @@ eui64_ntohost(char *hostname, size_t len, const struct eui64 *id)
char eui64_a[24];
char *yp_domain;
#endif
- if ((fp = fopen(_PATH_EUI64, "r")) == NULL)
+ if ((fp = fopen(_PATH_EUI64, "re")) == NULL)
return (1);
while (fgets(buf,BUFSIZ,fp)) {
@@ -277,7 +277,7 @@ eui64_hostton(const char *hostname, struct eui64 *id)
int resultlen;
char *yp_domain;
#endif
- if ((fp = fopen(_PATH_EUI64, "r")) == NULL)
+ if ((fp = fopen(_PATH_EUI64, "re")) == NULL)
return (1);
while (fgets(buf,BUFSIZ,fp)) {
diff --git a/lib/libc/net/getaddrinfo.c b/lib/libc/net/getaddrinfo.c
index d11ff78..c6af6d8 100644
--- a/lib/libc/net/getaddrinfo.c
+++ b/lib/libc/net/getaddrinfo.c
@@ -2240,7 +2240,7 @@ static void
_sethtent(FILE **hostf)
{
if (!*hostf)
- *hostf = fopen(_PATH_HOSTS, "r");
+ *hostf = fopen(_PATH_HOSTS, "re");
else
rewind(*hostf);
}
@@ -2264,7 +2264,7 @@ _gethtent(FILE **hostf, const char *name, const struct addrinfo *pai)
const char *addr;
char hostbuf[8*1024];
- if (!*hostf && !(*hostf = fopen(_PATH_HOSTS, "r")))
+ if (!*hostf && !(*hostf = fopen(_PATH_HOSTS, "re")))
return (NULL);
again:
if (!(p = fgets(hostbuf, sizeof hostbuf, *hostf)))
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);
}
diff --git a/lib/libc/net/getnetbyht.c b/lib/libc/net/getnetbyht.c
index d2df570..bee00e8 100644
--- a/lib/libc/net/getnetbyht.c
+++ b/lib/libc/net/getnetbyht.c
@@ -63,7 +63,7 @@ _setnethtent(int f, struct netent_data *ned)
{
if (ned->netf == NULL)
- ned->netf = fopen(_PATH_NETWORKS, "r");
+ ned->netf = fopen(_PATH_NETWORKS, "re");
else
rewind(ned->netf);
ned->stayopen |= f;
@@ -89,7 +89,7 @@ getnetent_p(struct netent *ne, struct netent_data *ned)
char line[BUFSIZ + 1];
if (ned->netf == NULL &&
- (ned->netf = fopen(_PATH_NETWORKS, "r")) == NULL)
+ (ned->netf = fopen(_PATH_NETWORKS, "re")) == NULL)
return (-1);
again:
p = fgets(line, sizeof line, ned->netf);
diff --git a/lib/libc/net/getprotoent.c b/lib/libc/net/getprotoent.c
index 0cfca45..114069a 100644
--- a/lib/libc/net/getprotoent.c
+++ b/lib/libc/net/getprotoent.c
@@ -342,7 +342,7 @@ void
__setprotoent_p(int f, struct protoent_data *ped)
{
if (ped->fp == NULL)
- ped->fp = fopen(_PATH_PROTOCOLS, "r");
+ ped->fp = fopen(_PATH_PROTOCOLS, "re");
else
rewind(ped->fp);
ped->stayopen |= f;
@@ -365,7 +365,7 @@ __getprotoent_p(struct protoent *pe, struct protoent_data *ped)
char *cp, **q, *endp;
long l;
- if (ped->fp == NULL && (ped->fp = fopen(_PATH_PROTOCOLS, "r")) == NULL)
+ if (ped->fp == NULL && (ped->fp = fopen(_PATH_PROTOCOLS, "re")) == NULL)
return (-1);
again:
if ((p = fgets(ped->line, sizeof ped->line, ped->fp)) == NULL)
diff --git a/lib/libc/net/getservent.c b/lib/libc/net/getservent.c
index 3228bdc..005de98 100644
--- a/lib/libc/net/getservent.c
+++ b/lib/libc/net/getservent.c
@@ -335,7 +335,7 @@ files_servent(void *retval, void *mdata, va_list ap)
if (st->fp == NULL)
st->compat_mode_active = 0;
- if (st->fp == NULL && (st->fp = fopen(_PATH_SERVICES, "r")) == NULL) {
+ if (st->fp == NULL && (st->fp = fopen(_PATH_SERVICES, "re")) == NULL) {
*errnop = errno;
return (NS_UNAVAIL);
}
@@ -449,7 +449,7 @@ files_setservent(void *retval, void *mdata, va_list ap)
case SETSERVENT:
f = va_arg(ap,int);
if (st->fp == NULL)
- st->fp = fopen(_PATH_SERVICES, "r");
+ st->fp = fopen(_PATH_SERVICES, "re");
else
rewind(st->fp);
st->stayopen |= f;
diff --git a/lib/libc/net/hesiod.c b/lib/libc/net/hesiod.c
index 2413727..4258993 100644
--- a/lib/libc/net/hesiod.c
+++ b/lib/libc/net/hesiod.c
@@ -286,7 +286,7 @@ read_config_file(ctx, filename)
ctx->classes[1] = C_HS;
/* Try to open the configuration file. */
- fp = fopen(filename, "r");
+ fp = fopen(filename, "re");
if (!fp) {
/* Use compiled in default domain names. */
ctx->lhs = strdup(DEF_LHS);
diff --git a/lib/libc/net/nsdispatch.c b/lib/libc/net/nsdispatch.c
index 9b7c29b..4fbc9ba 100644
--- a/lib/libc/net/nsdispatch.c
+++ b/lib/libc/net/nsdispatch.c
@@ -361,7 +361,7 @@ nss_configure(void)
if (result != 0)
goto fin2;
}
- _nsyyin = fopen(path, "r");
+ _nsyyin = fopen(path, "re");
if (_nsyyin == NULL)
goto fin;
VECTOR_FREE(_nsmap, &_nsmapsize, sizeof(*_nsmap),
diff --git a/lib/libc/net/rcmd.c b/lib/libc/net/rcmd.c
index 990289a..2885dc3 100644
--- a/lib/libc/net/rcmd.c
+++ b/lib/libc/net/rcmd.c
@@ -458,7 +458,7 @@ iruserok_sa(ra, rlen, superuser, ruser, luser)
raddr = (struct sockaddr *)&ss;
first = 1;
- hostf = superuser ? NULL : fopen(_PATH_HEQUIV, "r");
+ hostf = superuser ? NULL : fopen(_PATH_HEQUIV, "re");
again:
if (hostf) {
if (__ivaliduser_sa(hostf, raddr, rlen, luser, ruser) == 0) {
@@ -481,7 +481,7 @@ again:
*/
uid = geteuid();
(void)seteuid(pwd->pw_uid);
- hostf = fopen(pbuf, "r");
+ hostf = fopen(pbuf, "re");
(void)seteuid(uid);
if (hostf == NULL)
OpenPOWER on IntegriCloud