summaryrefslogtreecommitdiffstats
path: root/etc/inc/ipsec.attributes.php
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2013-10-22 18:42:32 +0000
committerErmal <eri@pfsense.org>2013-10-22 18:42:52 +0000
commiteb7d43c0f509b14eb1d4ea78ab26a446abf763e1 (patch)
treec9912823ea5047972ff0b306abd35fffd54e184a /etc/inc/ipsec.attributes.php
parent9f293b1c04f9ab4eec03312364692f38690737c2 (diff)
downloadpfsense-eb7d43c0f509b14eb1d4ea78ab26a446abf763e1.zip
pfsense-eb7d43c0f509b14eb1d4ea78ab26a446abf763e1.tar.gz
Use the pid of the process for the tmp file
Diffstat (limited to 'etc/inc/ipsec.attributes.php')
-rw-r--r--etc/inc/ipsec.attributes.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/etc/inc/ipsec.attributes.php b/etc/inc/ipsec.attributes.php
index bad0170..fd248d4 100644
--- a/etc/inc/ipsec.attributes.php
+++ b/etc/inc/ipsec.attributes.php
@@ -175,9 +175,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 \"ipsec/{$common_name}\" -f {$g['tmp_path']}/{$common_name}.rules");
- @unlink("{$g['tmp_path']}/{$common_name}.rules");
+ $pid = posix_getpid();
+ @file_put_contents("/tmp/{$pid}{$common_name}.rules", $rules);
+ mwexec("/sbin/pfctl -a \"ipsec/{$common_name}\" -f {$g['tmp_path']}/{$pid}{$common_name}.rules");
+ @unlink("{$g['tmp_path']}/{$pid}{$common_name}.rules");
}
?>
OpenPOWER on IntegriCloud