summaryrefslogtreecommitdiffstats
path: root/iptables-save.c
diff options
context:
space:
mode:
authorMaciej Zenczykowski <maze@google.com>2011-04-04 15:30:32 +0200
committerPatrick McHardy <kaber@trash.net>2011-04-04 15:30:32 +0200
commita239728ec064666025de2723997d87b176d57fd6 (patch)
tree20daf27af7f9d9fd12a6c0d1bf5f546afad5c21d /iptables-save.c
parent8d6492d582c7284217c042d5638cf50174e5fbfd (diff)
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 <maze@google.com> Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'iptables-save.c')
-rw-r--r--iptables-save.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/iptables-save.c b/iptables-save.c
index 3bcf4227..3e3ec43c 100644
--- a/iptables-save.c
+++ b/iptables-save.c
@@ -39,7 +39,7 @@ static int for_each_table(int (*func)(const char *tablename))
FILE *procfile = NULL;
char tablename[IPT_TABLE_MAXNAMELEN+1];
- procfile = fopen("/proc/net/ip_tables_names", "r");
+ procfile = fopen("/proc/net/ip_tables_names", "re");
if (!procfile)
return ret;