iptables/iptables-1.4.0-cloexec.patch
Thomas Woerner bfc8fd6a19 - new version 1.4.0
- fixed condrestart (rhbz#428148)
- report the module in rmmod_r if there is an error
2008-02-11 13:56:53 +00:00

17 lines
491 B
Diff

diff -up iptables-1.4.0/xtables.c.cloexec iptables-1.4.0/xtables.c
--- iptables-1.4.0/xtables.c.cloexec 2008-02-11 13:50:20.000000000 +0100
+++ iptables-1.4.0/xtables.c 2008-02-11 13:51:03.000000000 +0100
@@ -428,6 +428,12 @@ static int compatible_revision(const cha
exit(1);
}
+ if (fcntl(sockfd, F_SETFD, FD_CLOEXEC) == -1) {
+ fprintf(stderr, "Could not set close on exec: %s\n",
+ strerror(errno));
+ exit(1);
+ }
+
load_xtables_ko(modprobe, 1);
strcpy(rev.name, name);