public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Linux: Create Netlink socket with SOCK_CLOEXEC in __check_pf [BZ #15722]
@ 2018-06-18 11:08 Florian Weimer
  2018-06-18 13:24 ` Adhemerval Zanella
  0 siblings, 1 reply; 2+ messages in thread
From: Florian Weimer @ 2018-06-18 11:08 UTC (permalink / raw)
  To: libc-alpha

2018-06-18  Florian Weimer  <fweimer@redhat.com>

	[BZ #15722]
	* sysdeps/unix/sysv/linux/check_pf.c (__check_pf): Create Netlink
	socket with SOCK_CLOEXEC.

diff --git a/sysdeps/unix/sysv/linux/check_pf.c b/sysdeps/unix/sysv/linux/check_pf.c
index 36326abe80..04cd104aec 100644
--- a/sysdeps/unix/sysv/linux/check_pf.c
+++ b/sysdeps/unix/sysv/linux/check_pf.c
@@ -313,7 +313,7 @@ __check_pf (bool *seen_ipv4, bool *seen_ipv6,
     }
   else
     {
-      int fd = __socket (PF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
+      int fd = __socket (PF_NETLINK, SOCK_RAW | SOCK_CLOEXEC, NETLINK_ROUTE);
 
       if (__glibc_likely (fd >= 0))
 	{

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Linux: Create Netlink socket with SOCK_CLOEXEC in __check_pf [BZ #15722]
  2018-06-18 11:08 [PATCH] Linux: Create Netlink socket with SOCK_CLOEXEC in __check_pf [BZ #15722] Florian Weimer
@ 2018-06-18 13:24 ` Adhemerval Zanella
  0 siblings, 0 replies; 2+ messages in thread
From: Adhemerval Zanella @ 2018-06-18 13:24 UTC (permalink / raw)
  To: libc-alpha



On 18/06/2018 08:08, Florian Weimer wrote:
> 2018-06-18  Florian Weimer  <fweimer@redhat.com>
> 
> 	[BZ #15722]
> 	* sysdeps/unix/sysv/linux/check_pf.c (__check_pf): Create Netlink
> 	socket with SOCK_CLOEXEC.
> 
> diff --git a/sysdeps/unix/sysv/linux/check_pf.c b/sysdeps/unix/sysv/linux/check_pf.c
> index 36326abe80..04cd104aec 100644
> --- a/sysdeps/unix/sysv/linux/check_pf.c
> +++ b/sysdeps/unix/sysv/linux/check_pf.c
> @@ -313,7 +313,7 @@ __check_pf (bool *seen_ipv4, bool *seen_ipv6,
>      }
>    else
>      {
> -      int fd = __socket (PF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
> +      int fd = __socket (PF_NETLINK, SOCK_RAW | SOCK_CLOEXEC, NETLINK_ROUTE);
>  
>        if (__glibc_likely (fd >= 0))
>  	{
> 

LGTM, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-06-18 13:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-18 11:08 [PATCH] Linux: Create Netlink socket with SOCK_CLOEXEC in __check_pf [BZ #15722] Florian Weimer
2018-06-18 13:24 ` Adhemerval Zanella

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).