commit cb07e71ba4374e1c2766b391ed259e8c73ae41fe
parent 4890166e2f1d920d1b1de51d0ce49b2b9995e5c8
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:
1 file changed, 1 insertion(+), 0 deletions(-)
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;
}