about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--sysdeps/unix/sysv/linux/check_pf.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 3cf598575f..2f71706759 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+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.
+
 2018-06-18  Joseph Myers  <joseph@codesourcery.com>
 
 	[BZ #23303]
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))
 	{