diff options
author | Phil Davis <phil.davis@world.inf.org> | 2014-02-10 19:05:26 -0800 |
---|---|---|
committer | Phil Davis <phil.davis@world.inf.org> | 2014-02-10 19:05:26 -0800 |
commit | 6240ba7bd1e250c9d22c1bc80f5fb477fd87b7c1 (patch) | |
tree | a4e254baa779ca0cb68d70231c2809982a86454c /etc/inc/system.inc | |
parent | 83491ba51ccdb058fe1f4b4cfdf1a46e979417cb (diff) | |
download | pfsense-6240ba7bd1e250c9d22c1bc80f5fb477fd87b7c1.zip pfsense-6240ba7bd1e250c9d22c1bc80f5fb477fd87b7c1.tar.gz |
Check for tmp captiveportal dir before making it
In forum: https://forum.pfsense.org/index.php/topic,72483.0.html
Warning: mkdir(): File exists in /etc/inc/system.inc on line 878
Not sure if you would rather call safe_mkdir here?
Diffstat (limited to 'etc/inc/system.inc')
-rw-r--r-- | etc/inc/system.inc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/etc/inc/system.inc b/etc/inc/system.inc index 2a7c80a..983eebe 100644 --- a/etc/inc/system.inc +++ b/etc/inc/system.inc @@ -938,7 +938,8 @@ function system_generate_lighty_config($filename, $captive_portal_mod_evasive = "evasive.max-conns-per-ip = {$maxprocperip}"; $server_upload_dirs = "server.upload-dirs = ( \"{$g['tmp_path']}/captiveportal/\" )\n"; - mkdir("{$g['tmp_path']}/captiveportal", 0555); + if(!is_dir("{$g['tmp_path']}/captiveportal")) + mkdir("{$g['tmp_path']}/captiveportal", 0555); $server_max_request_size = "server.max-request-size = 384"; $cgi_config = ""; } else { |