nldev: close netlink filhandle on exec - nldev - NetLink DEVice manager; a lightweight netlink frontend for mdev.
       
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) LICENSE
       ---
 (DIR) commit cb07e71ba4374e1c2766b391ed259e8c73ae41fe
 (DIR) parent 4890166e2f1d920d1b1de51d0ce49b2b9995e5c8
 (HTM) Author: Natanael Copa <ncopa@alpinelinux.org>
       Date:   Thu, 12 Mar 2015 21:05:27 +0100
       
       nldev: close netlink filhandle on exec
       
       So we dont leak the filehandle to the children.
       
       Signed-off-by: Christoph Lohmann <20h@r-36.net>
       
       Diffstat:
         nldev.c                             |       1 +
       
       1 file changed, 1 insertion(+), 0 deletions(-)
       ---
 (DIR) diff --git a/nldev.c b/nldev.c
       @@ -175,6 +175,7 @@ init_netlink_socket(void)
                if (bind(fd, (void *)&nls, sizeof(nls)))
                        edie("bind");
        
       +        fcntl(fd, F_SETFD, FD_CLOEXEC);
                return fd;
        }