Revision eb7d43c0
Added by Ermal LUÇI over 11 years ago
etc/inc/ipsec.attributes.php | ||
---|---|---|
175 | 175 |
|
176 | 176 |
$rules = parse_cisco_acl($attributes); |
177 | 177 |
if (!empty($rules)) { |
178 |
@file_put_contents("/tmp/{$common_name}.rules", $rules); |
|
179 |
mwexec("/sbin/pfctl -a \"ipsec/{$common_name}\" -f {$g['tmp_path']}/{$common_name}.rules"); |
|
180 |
@unlink("{$g['tmp_path']}/{$common_name}.rules"); |
|
178 |
$pid = posix_getpid(); |
|
179 |
@file_put_contents("/tmp/{$pid}{$common_name}.rules", $rules); |
|
180 |
mwexec("/sbin/pfctl -a \"ipsec/{$common_name}\" -f {$g['tmp_path']}/{$pid}{$common_name}.rules"); |
|
181 |
@unlink("{$g['tmp_path']}/{$pid}{$common_name}.rules"); |
|
181 | 182 |
} |
182 | 183 |
|
183 | 184 |
?> |
Also available in: Unified diff
Use the pid of the process for the tmp file