From 283952c4a82b5a9d20932dff1f21148672d33bf4 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Thu, 28 Apr 2016 11:14:10 +0200 Subject: inet: Remove SCCS keywords --- inet/rexec.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'inet/rexec.c') diff --git a/inet/rexec.c b/inet/rexec.c index 4e6d48d6b8..24ac4b11b6 100644 --- a/inet/rexec.c +++ b/inet/rexec.c @@ -27,10 +27,6 @@ * SUCH DAMAGE. */ -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "@(#)rexec.c 8.1 (Berkeley) 6/4/93"; -#endif /* LIBC_SCCS and not lint */ - #include #include -- cgit v1.2.3 From ae65d4f3c3995279ca458c460ebf8bab1885fa03 Mon Sep 17 00:00:00 2001 From: Wilco Dijkstra Date: Mon, 13 Mar 2017 18:42:35 +0000 Subject: Remove the str(n)dup inlines from string/bits/string2.h. Although inlining calls with constant strings shows a small (~10%) performance gain, strdup is typically used in error reporting code, so not performance critical. Remove the now unused __need_malloc_and_calloc related defines from stdlib.h. Rename existing uses of str(n)dup to __str(n)dup so it no longer needs to be redirected to a builtin. Also building GLIBC with -Os now no longer shows localplt or linkname space failures (partial fix for BZ #15105 and BZ #19463). [BZ #15105] [BZ #19463] * elf/dl-cache.c (_dl_load_cache_lookup): Use __strdup. * inet/rcmd.c (rcmd_af): Likewise. * inet/rexec.c (rexec_af): Likewise. * intl/dcigettext.c (_LIBC): Likewise. * intl/finddomain.c (_nl_find_domain): Use strdup expansion. * locale/loadarchive.c (_nl_load_locale_from_archive): Use __strdup. * locale/setlocale.c (setlocale): Likewise. * posix/spawn_faction_addopen.c (posix_spawn_file_actions_addopen): Likewise. * stdlib/putenv.c (putenv): Use __strndup. * sunrpc/svc_simple.c (__registerrpc): Use __strdup. * sysdeps/posix/getaddrinfo.c (gaih_inet): Use __strdup/__strndup. * include/stdlib.h (__need_malloc_and_calloc): Remove uses. (__Need_M_And_C) Remove define/undef. * stdlib/stdlib.h (__need_malloc_and_calloc): Remove uses. (__malloc_and_calloc_defined): Remove define. * string/bits/string2.h (__strdup): Remove define. (strdup): Likewise. (__strndup): Likewise. (strndup): Likewise. --- ChangeLog | 25 ++++++++++++++++++ elf/dl-cache.c | 2 +- include/stdlib.h | 8 +----- inet/rcmd.c | 2 +- inet/rexec.c | 2 +- intl/dcigettext.c | 1 + intl/finddomain.c | 6 ----- locale/loadarchive.c | 2 +- locale/setlocale.c | 2 +- posix/spawn_faction_addopen.c | 2 +- stdlib/putenv.c | 2 +- stdlib/stdlib.h | 18 +++---------- string/bits/string2.h | 59 ------------------------------------------- sunrpc/svc_simple.c | 4 +-- sysdeps/posix/getaddrinfo.c | 4 +-- 15 files changed, 41 insertions(+), 98 deletions(-) (limited to 'inet/rexec.c') diff --git a/ChangeLog b/ChangeLog index 4ae0038025..44dec7cb30 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,28 @@ +2017-03-13 Wilco Dijkstra + + [BZ #15105] + [BZ #19463] + * elf/dl-cache.c (_dl_load_cache_lookup): Use __strdup. + * inet/rcmd.c (rcmd_af): Likewise. + * inet/rexec.c (rexec_af): Likewise. + * intl/dcigettext.c (_LIBC): Likewise. + * intl/finddomain.c (_nl_find_domain): Use strdup expansion. + * locale/loadarchive.c (_nl_load_locale_from_archive): Use __strdup. + * locale/setlocale.c (setlocale): Likewise. + * posix/spawn_faction_addopen.c + (posix_spawn_file_actions_addopen): Likewise. + * stdlib/putenv.c (putenv): Use __strndup. + * sunrpc/svc_simple.c (__registerrpc): Use __strdup. + * sysdeps/posix/getaddrinfo.c (gaih_inet): Use __strdup/__strndup. + * include/stdlib.h (__need_malloc_and_calloc): Remove uses. + (__Need_M_And_C) Remove define/undef. + * stdlib/stdlib.h (__need_malloc_and_calloc): Remove uses. + (__malloc_and_calloc_defined): Remove define. + * string/bits/string2.h (__strdup): Remove define. + (strdup): Likewise. + (__strndup): Likewise. + (strndup): Likewise. + 2017-03-13 Joseph Myers * sysdeps/unix/sysv/linux/bits/in.h (IPV6_AUTOFLOWLABEL): New diff --git a/elf/dl-cache.c b/elf/dl-cache.c index 1ac7524c3e..017c78aae3 100644 --- a/elf/dl-cache.c +++ b/elf/dl-cache.c @@ -302,7 +302,7 @@ _dl_load_cache_lookup (const char *name) char *temp; temp = alloca (strlen (best) + 1); strcpy (temp, best); - return strdup (temp); + return __strdup (temp); } #ifndef MAP_COPY diff --git a/include/stdlib.h b/include/stdlib.h index 352339e859..929cead59a 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -1,16 +1,12 @@ #ifndef _STDLIB_H -#ifdef __need_malloc_and_calloc -#define __Need_M_And_C -#endif - #ifndef _ISOMAC # include #endif #include /* Now define the internal interfaces. */ -#if !defined __Need_M_And_C && !defined _ISOMAC +#if !defined _ISOMAC # include __BEGIN_DECLS @@ -269,6 +265,4 @@ __END_DECLS #endif -#undef __Need_M_And_C - #endif /* include/stdlib.h */ diff --git a/inet/rcmd.c b/inet/rcmd.c index 8613d96764..b7cc7a82ba 100644 --- a/inet/rcmd.c +++ b/inet/rcmd.c @@ -149,7 +149,7 @@ rcmd_af (char **ahost, u_short rport, const char *locuser, const char *remuser, if (res->ai_canonname){ free (ahostbuf); - ahostbuf = strdup (res->ai_canonname); + ahostbuf = __strdup (res->ai_canonname); if (ahostbuf == NULL) { __fxprintf(NULL, "%s", _("rcmd: Cannot allocate memory\n")); diff --git a/inet/rexec.c b/inet/rexec.c index 24ac4b11b6..43fb67bcf2 100644 --- a/inet/rexec.c +++ b/inet/rexec.c @@ -73,7 +73,7 @@ rexec_af (char **ahost, int rport, const char *name, const char *pass, if (res0->ai_canonname){ free (ahostbuf); - ahostbuf = strdup (res0->ai_canonname); + ahostbuf = __strdup (res0->ai_canonname); if (ahostbuf == NULL) { perror ("rexec: strdup"); return (-1); diff --git a/intl/dcigettext.c b/intl/dcigettext.c index 95fa72b1c5..3843b7cbdf 100644 --- a/intl/dcigettext.c +++ b/intl/dcigettext.c @@ -131,6 +131,7 @@ extern int errno; /* Rename the non ANSI C functions. This is required by the standard because some ANSI C functions will require linking with this object file and the name space must not be polluted. */ +# define strdup __strdup # define getcwd __getcwd # ifndef stpcpy # define stpcpy __stpcpy diff --git a/intl/finddomain.c b/intl/finddomain.c index cb61a0c8d6..88fd880dbc 100644 --- a/intl/finddomain.c +++ b/intl/finddomain.c @@ -124,18 +124,12 @@ _nl_find_domain (const char *dirname, char *locale, alias_value = _nl_expand_alias (locale); if (alias_value != NULL) { -#if defined _LIBC || defined HAVE_STRDUP - locale = strdup (alias_value); - if (locale == NULL) - return NULL; -#else size_t len = strlen (alias_value) + 1; locale = (char *) malloc (len); if (locale == NULL) return NULL; memcpy (locale, alias_value, len); -#endif } /* Now we determine the single parts of the locale name. First diff --git a/locale/loadarchive.c b/locale/loadarchive.c index fc6fb32a9d..e6e1a05d2e 100644 --- a/locale/loadarchive.c +++ b/locale/loadarchive.c @@ -462,7 +462,7 @@ _nl_load_locale_from_archive (int category, const char **namep) if (__glibc_unlikely (lia == NULL)) return NULL; - lia->name = strdup (*namep); + lia->name = __strdup (*namep); if (__glibc_unlikely (lia->name == NULL)) { free (lia); diff --git a/locale/setlocale.c b/locale/setlocale.c index 1603ef306a..19acc4b2c7 100644 --- a/locale/setlocale.c +++ b/locale/setlocale.c @@ -283,7 +283,7 @@ setlocale (int category, const char *locale) if (__glibc_unlikely (strchr (locale, ';') != NULL)) { /* This is a composite name. Make a copy and split it up. */ - locale_copy = strdup (locale); + locale_copy = __strdup (locale); if (__glibc_unlikely (locale_copy == NULL)) { __libc_rwlock_unlock (__libc_setlocale_lock); diff --git a/posix/spawn_faction_addopen.c b/posix/spawn_faction_addopen.c index 95111684bc..cbb3584345 100644 --- a/posix/spawn_faction_addopen.c +++ b/posix/spawn_faction_addopen.c @@ -34,7 +34,7 @@ posix_spawn_file_actions_addopen (posix_spawn_file_actions_t *file_actions, if (!__spawn_valid_fd (fd)) return EBADF; - char *path_copy = strdup (path); + char *path_copy = __strdup (path); if (path_copy == NULL) return ENOMEM; diff --git a/stdlib/putenv.c b/stdlib/putenv.c index 85890fec26..c0488fc505 100644 --- a/stdlib/putenv.c +++ b/stdlib/putenv.c @@ -60,7 +60,7 @@ putenv (char *string) int use_malloc = !__libc_use_alloca (name_end - string + 1); if (__builtin_expect (use_malloc, 0)) { - name = strndup (string, name_end - string); + name = __strndup (string, name_end - string); if (name == NULL) return -1; } diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h index 292c6a2f05..7cfbcafe79 100644 --- a/stdlib/stdlib.h +++ b/stdlib/stdlib.h @@ -25,16 +25,13 @@ #include /* Get size_t, wchar_t and NULL from . */ -#define __need_size_t -#ifndef __need_malloc_and_calloc -# define __need_wchar_t -# define __need_NULL -#endif +#define __need_size_t +#define __need_wchar_t +#define __need_NULL #include __BEGIN_DECLS -#ifndef __need_malloc_and_calloc #define _STDLIB_H 1 #if (defined __USE_XOPEN || defined __USE_XOPEN2K8) && !defined _SYS_WAIT_H @@ -434,10 +431,6 @@ extern int lcong48_r (unsigned short int __param[7], # endif /* Use misc. */ #endif /* Use misc or X/Open. */ -#endif /* don't just need malloc and calloc */ - -#ifndef __malloc_and_calloc_defined -# define __malloc_and_calloc_defined __BEGIN_NAMESPACE_STD /* Allocate SIZE bytes of memory. */ extern void *malloc (size_t __size) __THROW __attribute_malloc__ __wur; @@ -445,9 +438,7 @@ extern void *malloc (size_t __size) __THROW __attribute_malloc__ __wur; extern void *calloc (size_t __nmemb, size_t __size) __THROW __attribute_malloc__ __wur; __END_NAMESPACE_STD -#endif -#ifndef __need_malloc_and_calloc __BEGIN_NAMESPACE_STD /* Re-allocate the previously allocated block in PTR, making the new block SIZE bytes long. */ @@ -944,9 +935,6 @@ extern int ttyslot (void) __THROW; # include #endif -#endif /* don't just need malloc and calloc */ -#undef __need_malloc_and_calloc - __END_DECLS #endif /* stdlib.h */ diff --git a/string/bits/string2.h b/string/bits/string2.h index 2d4eb41589..6a26e2bc68 100644 --- a/string/bits/string2.h +++ b/string/bits/string2.h @@ -112,65 +112,6 @@ #endif -/* We need the memory allocation functions for inline strdup(). - Referring to stdlib.h (even minimally) is not allowed - in any of the tight standards compliant modes. */ -#ifdef __USE_MISC - -# if !defined _HAVE_STRING_ARCH_strdup || !defined _HAVE_STRING_ARCH_strndup -# define __need_malloc_and_calloc -# include -# endif - -# ifndef _HAVE_STRING_ARCH_strdup - -extern char *__strdup (const char *__string) __THROW __attribute_malloc__; -# define __strdup(s) \ - (__extension__ (__builtin_constant_p (s) && __string2_1bptr_p (s) \ - ? (((const char *) (s))[0] == '\0' \ - ? (char *) calloc ((size_t) 1, (size_t) 1) \ - : ({ size_t __len = strlen (s) + 1; \ - char *__retval = (char *) malloc (__len); \ - if (__retval != NULL) \ - __retval = (char *) memcpy (__retval, s, __len); \ - __retval; })) \ - : __strdup (s))) - -# if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 -# define strdup(s) __strdup (s) -# endif -# endif - -# ifndef _HAVE_STRING_ARCH_strndup - -extern char *__strndup (const char *__string, size_t __n) - __THROW __attribute_malloc__; -# define __strndup(s, n) \ - (__extension__ (__builtin_constant_p (s) && __string2_1bptr_p (s) \ - ? (((const char *) (s))[0] == '\0' \ - ? (char *) calloc ((size_t) 1, (size_t) 1) \ - : ({ size_t __len = strlen (s) + 1; \ - size_t __n = (n); \ - char *__retval; \ - if (__n < __len) \ - __len = __n + 1; \ - __retval = (char *) malloc (__len); \ - if (__retval != NULL) \ - { \ - __retval[__len - 1] = '\0'; \ - __retval = (char *) memcpy (__retval, s, \ - __len - 1); \ - } \ - __retval; })) \ - : __strndup (s, n))) - -# ifdef __USE_XOPEN2K8 -# define strndup(s, n) __strndup (s, n) -# endif -# endif - -#endif /* Use misc. or use GNU. */ - #ifndef _FORCE_INLINES # undef __STRING_INLINE #endif diff --git a/sunrpc/svc_simple.c b/sunrpc/svc_simple.c index baa177eec0..acc9b9db14 100644 --- a/sunrpc/svc_simple.c +++ b/sunrpc/svc_simple.c @@ -87,7 +87,7 @@ __registerrpc (u_long prognum, u_long versnum, u_long procnum, transp = svcudp_create (RPC_ANYSOCK); if (transp == NULL) { - buf = strdup (_("couldn't create an rpc server\n")); + buf = __strdup (_("couldn't create an rpc server\n")); goto err_out; } } @@ -103,7 +103,7 @@ __registerrpc (u_long prognum, u_long versnum, u_long procnum, pl = (struct proglst_ *) malloc (sizeof (struct proglst_)); if (pl == NULL) { - buf = strdup (_("registerrpc: out of memory\n")); + buf = __strdup (_("registerrpc: out of memory\n")); goto err_out; } pl->p_progname = progname; diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c index 43eb31365e..eed7264850 100644 --- a/sysdeps/posix/getaddrinfo.c +++ b/sysdeps/posix/getaddrinfo.c @@ -536,7 +536,7 @@ gaih_inet (const char *name, const struct gaih_service *service, } else { - namebuf = strndup (name, scope_delim - name); + namebuf = __strndup (name, scope_delim - name); if (namebuf == NULL) { assert (!malloc_name); @@ -1141,7 +1141,7 @@ gaih_inet (const char *name, const struct gaih_service *service, malloc_canonbuf = false; else { - canon = strdup (canon); + canon = __strdup (canon); if (canon == NULL) { result = -EAI_MEMORY; -- cgit v1.2.3 From 2f83a7294d0d0904d72839843a80531769525d59 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Wed, 19 Apr 2017 07:45:04 +0200 Subject: Create more sockets with SOCK_CLOEXEC [BZ #15722] --- ChangeLog | 13 +++++++++++++ inet/rcmd.c | 1 + inet/rexec.c | 1 + nis/nis_findserv.c | 2 +- resolv/res_hconf.c | 2 +- resolv/res_send.c | 13 ++++++++----- sysdeps/posix/getaddrinfo.c | 2 +- sysdeps/unix/sysv/linux/check_native.c | 2 +- sysdeps/unix/sysv/linux/ifaddrs.c | 2 +- 9 files changed, 28 insertions(+), 10 deletions(-) (limited to 'inet/rexec.c') diff --git a/ChangeLog b/ChangeLog index 28fcdb24c7..a48c888fc1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2017-04-19 Florian Weimer + + [BZ #15722] + * resolv/res_hconf.c (_res_hconf_reorder_addrs): Create socket + with SOCK_CLOEXEC. + * resolv/res_send.c (send_vc, reopen): Likewise. + * sysdeps/posix/getaddrinfo.c (getaddrinfo): Likewise. + * sysdeps/unix/sysv/linux/check_native.c (__check_native): + Likewise. + * sysdeps/unix/sysv/linux/ifaddrs.c (__netlink_open): Likewise. + * inet/rexec.c (rexec_af): Add comment. + * inet/rcmd.c (rresvport_af): Likewise. + 2017-04-19 Florian Weimer * nscd/connections.c (have_accept4): Removed definition. diff --git a/inet/rcmd.c b/inet/rcmd.c index b7cc7a82ba..e43d4af818 100644 --- a/inet/rcmd.c +++ b/inet/rcmd.c @@ -383,6 +383,7 @@ rresvport_af (int *alport, sa_family_t family) __set_errno (EAFNOSUPPORT); return -1; } + /* NB: No SOCK_CLOXEC for backwards compatibility. */ s = __socket(family, SOCK_STREAM, 0); if (s < 0) return -1; diff --git a/inet/rexec.c b/inet/rexec.c index 43fb67bcf2..82e15aef05 100644 --- a/inet/rexec.c +++ b/inet/rexec.c @@ -86,6 +86,7 @@ rexec_af (char **ahost, int rport, const char *name, const char *pass, } ruserpass(res0->ai_canonname, &name, &pass); retry: + /* NB: No SOCK_CLOXEC for backwards compatibility. */ s = __socket(res0->ai_family, res0->ai_socktype, 0); if (s < 0) { perror("rexec: socket"); diff --git a/nis/nis_findserv.c b/nis/nis_findserv.c index 77f3c7c3ce..8e01164e3d 100644 --- a/nis/nis_findserv.c +++ b/nis/nis_findserv.c @@ -142,7 +142,7 @@ __nis_findfastest_with_timeout (dir_binding *bind, } /* Create RPC handle */ - sock = socket (AF_INET, SOCK_DGRAM, IPPROTO_UDP); + sock = socket (AF_INET, SOCK_DGRAM | SOCK_CLOEXEC, IPPROTO_UDP); clnt = clntudp_create (&saved_sin, NIS_PROG, NIS_VERSION, *timeout, &sock); if (clnt == NULL) { diff --git a/resolv/res_hconf.c b/resolv/res_hconf.c index d0d116d308..8fc06e9abd 100644 --- a/resolv/res_hconf.c +++ b/resolv/res_hconf.c @@ -388,7 +388,7 @@ _res_hconf_reorder_addrs (struct hostent *hp) /* Initialize interface table. */ /* The SIOCGIFNETMASK ioctl will only work on an AF_INET socket. */ - sd = __socket (AF_INET, SOCK_DGRAM, 0); + sd = __socket (AF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0); if (sd < 0) return; diff --git a/resolv/res_send.c b/resolv/res_send.c index ffb9a6af7b..3de0b3e07c 100644 --- a/resolv/res_send.c +++ b/resolv/res_send.c @@ -692,7 +692,8 @@ send_vc(res_state statp, if (statp->_vcsock >= 0) __res_iclose(statp, false); - statp->_vcsock = socket(nsap->sa_family, SOCK_STREAM, 0); + statp->_vcsock = socket + (nsap->sa_family, SOCK_STREAM | SOCK_CLOEXEC, 0); if (statp->_vcsock < 0) { *terrno = errno; Perror(statp, stderr, "socket(vc)", errno); @@ -902,14 +903,16 @@ reopen (res_state statp, int *terrno, int ns) /* only try IPv6 if IPv6 NS and if not failed before */ if (nsap->sa_family == AF_INET6 && !statp->ipv6_unavail) { - EXT(statp).nssocks[ns] - = socket(PF_INET6, SOCK_DGRAM|SOCK_NONBLOCK, 0); + EXT(statp).nssocks[ns] = socket + (PF_INET6, + SOCK_DGRAM | SOCK_NONBLOCK | SOCK_CLOEXEC, 0); if (EXT(statp).nssocks[ns] < 0) statp->ipv6_unavail = errno == EAFNOSUPPORT; slen = sizeof (struct sockaddr_in6); } else if (nsap->sa_family == AF_INET) { - EXT(statp).nssocks[ns] - = socket(PF_INET, SOCK_DGRAM|SOCK_NONBLOCK, 0); + EXT(statp).nssocks[ns] = socket + (PF_INET, + SOCK_DGRAM | SOCK_NONBLOCK | SOCK_CLOEXEC, 0); slen = sizeof (struct sockaddr_in); } if (EXT(statp).nssocks[ns] < 0) { diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c index eed7264850..a55cc39be7 100644 --- a/sysdeps/posix/getaddrinfo.c +++ b/sysdeps/posix/getaddrinfo.c @@ -2472,7 +2472,7 @@ getaddrinfo (const char *name, const char *service, close_retry: close_not_cancel_no_status (fd); af = q->ai_family; - fd = __socket (af, SOCK_DGRAM, IPPROTO_IP); + fd = __socket (af, SOCK_DGRAM | SOCK_CLOEXEC, IPPROTO_IP); } else { diff --git a/sysdeps/unix/sysv/linux/check_native.c b/sysdeps/unix/sysv/linux/check_native.c index 4a1646089f..7e5a7c9be3 100644 --- a/sysdeps/unix/sysv/linux/check_native.c +++ b/sysdeps/unix/sysv/linux/check_native.c @@ -41,7 +41,7 @@ void __check_native (uint32_t a1_index, int *a1_native, uint32_t a2_index, int *a2_native) { - int fd = __socket (PF_NETLINK, SOCK_RAW, NETLINK_ROUTE); + int fd = __socket (PF_NETLINK, SOCK_RAW | SOCK_CLOEXEC, NETLINK_ROUTE); struct sockaddr_nl nladdr; memset (&nladdr, '\0', sizeof (nladdr)); diff --git a/sysdeps/unix/sysv/linux/ifaddrs.c b/sysdeps/unix/sysv/linux/ifaddrs.c index cff12c2ac4..3bc9902863 100644 --- a/sysdeps/unix/sysv/linux/ifaddrs.c +++ b/sysdeps/unix/sysv/linux/ifaddrs.c @@ -255,7 +255,7 @@ __netlink_open (struct netlink_handle *h) { struct sockaddr_nl nladdr; - h->fd = __socket (PF_NETLINK, SOCK_RAW, NETLINK_ROUTE); + h->fd = __socket (PF_NETLINK, SOCK_RAW | SOCK_CLOEXEC, NETLINK_ROUTE); if (h->fd < 0) goto out; -- cgit v1.2.3 From b8129a415ec68858d67747644ad868421a399a49 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Wed, 19 Apr 2017 19:30:18 +0200 Subject: rcmd/rexec: Fix typo in comment --- ChangeLog | 5 +++++ inet/rcmd.c | 2 +- inet/rexec.c | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) (limited to 'inet/rexec.c') diff --git a/ChangeLog b/ChangeLog index e1e004f220..e8b81fcc2a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2017-04-19 Florian Weimer + + * inet/rcmd.c (rresvport_af): Fix typo in comment. + * inet/rexec.c (rexec_af): Likewise. + 2017-04-19 Zack Weinberg * posix/tst-mmap-offset.c: Include stdint.h. diff --git a/inet/rcmd.c b/inet/rcmd.c index e43d4af818..c285b9ecd6 100644 --- a/inet/rcmd.c +++ b/inet/rcmd.c @@ -383,7 +383,7 @@ rresvport_af (int *alport, sa_family_t family) __set_errno (EAFNOSUPPORT); return -1; } - /* NB: No SOCK_CLOXEC for backwards compatibility. */ + /* NB: No SOCK_CLOEXEC for backwards compatibility. */ s = __socket(family, SOCK_STREAM, 0); if (s < 0) return -1; diff --git a/inet/rexec.c b/inet/rexec.c index 82e15aef05..bda536723b 100644 --- a/inet/rexec.c +++ b/inet/rexec.c @@ -86,7 +86,7 @@ rexec_af (char **ahost, int rport, const char *name, const char *pass, } ruserpass(res0->ai_canonname, &name, &pass); retry: - /* NB: No SOCK_CLOXEC for backwards compatibility. */ + /* NB: No SOCK_CLOEXEC for backwards compatibility. */ s = __socket(res0->ai_family, res0->ai_socktype, 0); if (s < 0) { perror("rexec: socket"); -- cgit v1.2.3