Create more sockets with SOCK_CLOEXEC [BZ #15722]

Submitted by Florian Weimer on April 19, 2017, 6:24 p.m.

Details

Message ID a9ac4aba-6990-cf95-44c1-220f49e0465b@redhat.com
State New
Headers show

Commit Message

Florian Weimer April 19, 2017, 6:24 p.m.
On 04/19/2017 05:19 PM, Joseph Myers wrote:
> On Tue, 18 Apr 2017, Florian Weimer wrote:
> 
>> diff --git a/inet/rcmd.c b/inet/rcmd.c
>> index b7cc7a8..e43d4af 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.  */
> 
> "CLOXEC" typo, repeated elsewhere in this patch.

Thanks, fixed with the attached patch.

Florian

Patch hide | download patch | download mbox

rcmd/rexec: Fix typo in comment

2017-04-19  Florian Weimer  <fweimer@redhat.com>

	* inet/rcmd.c (rresvport_af): Fix typo in comment.
	* inet/rexec.c (rexec_af): Likewise.

diff --git a/inet/rcmd.c b/inet/rcmd.c
index e43d4af..c285b9e 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 82e15ae..bda5367 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");