mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Use the pid of the process for the tmp file also prepend ovpn_ here to make it clear
This commit is contained in:
parent
45758be466
commit
7b95ffdd72
@ -177,9 +177,10 @@ function parse_cisco_acl($attribs) {
|
||||
|
||||
$rules = parse_cisco_acl($attributes);
|
||||
if (!empty($rules)) {
|
||||
@file_put_contents("/tmp/{$common_name}.rules", $rules);
|
||||
mwexec("/sbin/pfctl -a \"openvpn/{$common_name}\" -f {$g['tmp_path']}/{$common_name}.rules");
|
||||
@unlink("{$g['tmp_path']}/{$common_name}.rules");
|
||||
$pid = posix_getpid();
|
||||
@file_put_contents("/tmp/ovpn_{$pid}{$common_name}.rules", $rules);
|
||||
mwexec("/sbin/pfctl -a \"openvpn/{$common_name}\" -f {$g['tmp_path']}/ovpn_{$pid}{$common_name}.rules");
|
||||
@unlink("{$g['tmp_path']}/ovpn_{$pid}{$common_name}.rules");
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user