Minor error
-
In here :
/etc/captiveportal.inc - function captiveportal_init_general_rules()At the end :
/* load rules */ file_put_contents("{$g['tmp_path']}/ipfw.cp.rules", $cprules); mwexec("/sbin/ipfw -q {$g['tmp_path']}/ipfw.cp.rules", true); @unlink("{$g['tmp_path']}/ipfw_{$cpzone}.cp.rules"); unset($cprules); }
file_put_contents : the file /tmp/ipfw.cp.rules is created.
This file /tmp/ipfw.cp.rules is passed to "ipfw" as a command line parameter.
Another file is deleted (unlined) : /tmp//ipfw**_{$cpzone}**.cp.rulesWhy another file ?
@unlink("{$g['tmp_path']}/ipfw_{$cpzone}.cp.rules");
should be :
@unlink("{$g['tmp_path']}/ipfw.cp.rules");
Right ?
I guess the file /tmp/ipfw.cp.rules will get overwritten anyway the next time the "general" ipfw rules are re created, so this is a non issue.
It's a redmine case ?
-
Looks wrong to me but code in that area is already being overhauled significantly and is going to be irrelevant soon, so it may be moot.