From a239728ec064666025de2723997d87b176d57fd6 Mon Sep 17 00:00:00 2001 From: Maciej Zenczykowski Date: Mon, 4 Apr 2011 15:30:32 +0200 Subject: mark newly opened fds as FD_CLOEXEC (close on exec) (This is iptables-1.4.3.1-cloexec.patch from RedHat iptables.src.rpm) Signed-off-by: Maciej Zenczykowski Signed-off-by: Patrick McHardy --- iptables-restore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'iptables-restore.c') diff --git a/iptables-restore.c b/iptables-restore.c index 31ce52bf..c2cc58c8 100644 --- a/iptables-restore.c +++ b/iptables-restore.c @@ -174,7 +174,7 @@ main(int argc, char *argv[]) } if (optind == argc - 1) { - in = fopen(argv[optind], "r"); + in = fopen(argv[optind], "re"); if (!in) { fprintf(stderr, "Can't open %s: %s\n", argv[optind], strerror(errno)); -- cgit v1.2.3