diff options
| author | christos <christos@NetBSD.org> | 2014-09-18 13:58:20 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2014-09-18 13:58:20 +0000 |
| commit | 2c32905e1bfbd923da80f3b2b717ca983295f8ad (patch) | |
| tree | ee0132025875532ffa8e7e9480e8dece1419fde2 /lib/libc/net | |
| parent | 658a9a8f623a74a2f8d0189494c4822ef512350a (diff) | |
make more descriptors that we open as close-on-exec
Diffstat (limited to 'lib/libc/net')
| -rw-r--r-- | lib/libc/net/ethers.c | 8 | ||||
| -rw-r--r-- | lib/libc/net/hesiod.c | 6 | ||||
| -rw-r--r-- | lib/libc/net/nsdispatch.c | 6 | ||||
| -rw-r--r-- | lib/libc/net/rcmd.c | 8 |
4 files changed, 14 insertions, 14 deletions
diff --git a/lib/libc/net/ethers.c b/lib/libc/net/ethers.c index 7cc1686a0fe..3cafbde3604 100644 --- a/lib/libc/net/ethers.c +++ b/lib/libc/net/ethers.c @@ -1,4 +1,4 @@ -/* $NetBSD: ethers.c,v 1.24 2014/06/19 15:09:07 christos Exp $ */ +/* $NetBSD: ethers.c,v 1.25 2014/09/18 13:58:20 christos Exp $ */ /* * ethers(3N) a la Sun. @@ -9,7 +9,7 @@ #include <sys/cdefs.h> #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: ethers.c,v 1.24 2014/06/19 15:09:07 christos Exp $"); +__RCSID("$NetBSD: ethers.c,v 1.25 2014/09/18 13:58:20 christos Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -97,7 +97,7 @@ ether_ntohost(char *hostname, const struct ether_addr *e) e->ether_addr_octet[4], e->ether_addr_octet[5]); #endif - f = fopen(_PATH_ETHERS, "r"); + f = fopen(_PATH_ETHERS, "re"); if (f == NULL) return -1; for (p = NULL;;) { @@ -150,7 +150,7 @@ ether_hostton(const char *hostname, struct ether_addr *e) _DIAGASSERT(hostname != NULL); _DIAGASSERT(e != NULL); - f = fopen(_PATH_ETHERS, "r"); + f = fopen(_PATH_ETHERS, "re"); if (f == NULL) return -1; diff --git a/lib/libc/net/hesiod.c b/lib/libc/net/hesiod.c index 9663e45ee27..f40df0e0de8 100644 --- a/lib/libc/net/hesiod.c +++ b/lib/libc/net/hesiod.c @@ -1,4 +1,4 @@ -/* $NetBSD: hesiod.c,v 1.27 2012/03/20 17:44:18 matt Exp $ */ +/* $NetBSD: hesiod.c,v 1.28 2014/09/18 13:58:20 christos Exp $ */ /* Copyright (c) 1996 by Internet Software Consortium. * @@ -51,7 +51,7 @@ __IDSTRING(rcsid_hesiod_p_h, "#Id: hesiod_p.h,v 1.1 1996/12/08 21:39:37 ghudson Exp #"); __IDSTRING(rcsid_hescompat_c, "#Id: hescompat.c,v 1.1.2.1 1996/12/16 08:37:45 ghudson Exp #"); -__RCSID("$NetBSD: hesiod.c,v 1.27 2012/03/20 17:44:18 matt Exp $"); +__RCSID("$NetBSD: hesiod.c,v 1.28 2014/09/18 13:58:20 christos Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -320,7 +320,7 @@ read_config_file(struct hesiod_p *ctx, const char *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 8bfaa3b24ec..738f52b1a9a 100644 --- a/lib/libc/net/nsdispatch.c +++ b/lib/libc/net/nsdispatch.c @@ -1,4 +1,4 @@ -/* $NetBSD: nsdispatch.c,v 1.37 2012/03/13 21:13:42 christos Exp $ */ +/* $NetBSD: nsdispatch.c,v 1.38 2014/09/18 13:58:20 christos Exp $ */ /*- * Copyright (c) 1997, 1998, 1999, 2004 The NetBSD Foundation, Inc. @@ -63,7 +63,7 @@ #include <sys/cdefs.h> #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: nsdispatch.c,v 1.37 2012/03/13 21:13:42 christos Exp $"); +__RCSID("$NetBSD: nsdispatch.c,v 1.38 2014/09/18 13:58:20 christos Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -519,7 +519,7 @@ _nsconfigure(void) */ rwlock_wrlock(&_nslock); - _nsyyin = fopen(_PATH_NS_CONF, "r"); + _nsyyin = fopen(_PATH_NS_CONF, "re"); if (_nsyyin == NULL) { /* * Unable to open nsswitch.conf; behave as though the diff --git a/lib/libc/net/rcmd.c b/lib/libc/net/rcmd.c index 33444657e84..265ee4bab9c 100644 --- a/lib/libc/net/rcmd.c +++ b/lib/libc/net/rcmd.c @@ -1,4 +1,4 @@ -/* $NetBSD: rcmd.c,v 1.69 2014/05/28 14:39:02 christos Exp $ */ +/* $NetBSD: rcmd.c,v 1.70 2014/09/18 13:58:20 christos Exp $ */ /* * Copyright (c) 1983, 1993, 1994 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)rcmd.c 8.3 (Berkeley) 3/26/94"; #else -__RCSID("$NetBSD: rcmd.c,v 1.69 2014/05/28 14:39:02 christos Exp $"); +__RCSID("$NetBSD: rcmd.c,v 1.70 2014/09/18 13:58:20 christos Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -670,7 +670,7 @@ iruserok_sa(const void *raddr, int rlen, int superuser, const char *ruser, __rcmd_errstr = NULL; - hostf = superuser ? NULL : fopen(_PATH_HEQUIV, "r"); + hostf = superuser ? NULL : fopen(_PATH_HEQUIV, "re"); if (hostf) { if (__ivaliduser_sa(hostf, sa, (socklen_t)rlen, luser, @@ -700,7 +700,7 @@ iruserok_sa(const void *raddr, int rlen, int superuser, const char *ruser, (void)setegid(pwd->pw_gid); (void)initgroups(pwd->pw_name, pwd->pw_gid); (void)seteuid(pwd->pw_uid); - hostf = fopen(pbuf, "r"); + hostf = fopen(pbuf, "re"); if (hostf != NULL) { /* |
