]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Linux: Create Netlink socket with SOCK_CLOEXEC in __check_pf [BZ #15722]
authorFlorian Weimer <fweimer@redhat.com>
Mon, 18 Jun 2018 11:08:08 +0000 (13:08 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Mon, 18 Jun 2018 13:24:55 +0000 (15:24 +0200)
ChangeLog
sysdeps/unix/sysv/linux/check_pf.c

index 3cf598575f7e140b52c47cba0c20e158051aae14..2f71706759095a17e724b3badb9b5be136f54e7b 100644 (file)
--- 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]
index 36326abe80425ae13b2266ce4eb4907766a222af..04cd104aec5b6b39d22bfd0fa14336803189e212 100644 (file)
@@ -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))
        {