summaryrefslogtreecommitdiffstats
path: root/etc/inc/openvpn.attributes.php
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2013-10-22 18:46:12 +0000
committerErmal <eri@pfsense.org>2013-10-22 18:46:12 +0000
commit7b95ffdd72d2abb515c9cda22570c4ec1a09f081 (patch)
treebe0d45c18dfefe7cd84660913a354942db1a0f22 /etc/inc/openvpn.attributes.php
parent45758be466500461e35fb4a6308c3d35126470b4 (diff)
downloadpfsense-7b95ffdd72d2abb515c9cda22570c4ec1a09f081.zip
pfsense-7b95ffdd72d2abb515c9cda22570c4ec1a09f081.tar.gz
Use the pid of the process for the tmp file also prepend ovpn_ here to make it clear
Diffstat (limited to 'etc/inc/openvpn.attributes.php')
-rw-r--r--etc/inc/openvpn.attributes.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/etc/inc/openvpn.attributes.php b/etc/inc/openvpn.attributes.php
index 0c8a96f..209af70 100644
--- a/etc/inc/openvpn.attributes.php
+++ b/etc/inc/openvpn.attributes.php
@@ -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");
}
?>
OpenPOWER on IntegriCloud