aboutsummaryrefslogtreecommitdiff
path: root/plugin/defer/winbuild
diff options
context:
space:
mode:
authorDavid Sommerseth <davids@redhat.com>2011-04-14 16:21:16 +0200
committerDavid Sommerseth <davids@redhat.com>2011-04-14 21:10:29 +0200
commiteb4b1bb6adc7fb1828839967a7807b6317305145 (patch)
tree62352b29644698b86d204fbe1c90f52965131758 /plugin/defer/winbuild
parentFixed bug in port-share that could cause port share process to crash (diff)
downloadopenvpn-eb4b1bb6adc7fb1828839967a7807b6317305145.tar.xz
Change the default --tmp-dir path to a more suitable path
In commit 4e1cc5f6dda22e9 the create_temp_filename() function was reviewed and hardened, which in the end renamed this function to create_temp_file() in commit 495e3cec5d156. With these changes it became more evident that OpenVPN needs a directory where it can create temporary files. The create_temp_file() will create such files f.ex. if --client-connect or --plugin which makes use of the OPENVPN_PLUGIN_AUTH_USER_PASS_VERIFY hook, such as openvpn-auth-pam.so. When this happens, OpenVPN will normally create these files in the directory OpenVPN was started. In many cases, this will fail due to restricted access. By using --tmp-dir and pointing it to a directory writeable to the user running OpenVPN, it works again. This patch makes OpenVPN use a more suitable temproary directory by default, instead of the current working directory. On non-Windows platforms this default value is set to '/tmp', but can be modified at compile-time by running ./configure --with-tmp-dir-path=<TEMP DIR PATH>. On Windows, it will use GetTempPath() to find temporary paths recommended by the OS. If this fails, it will fallback to the old behaviour, using the directory where OpenVPN was started. In any cases, this default value can be overridden in the configuration file by using the --tmp-dir option, as before. To check what the default is at runime, you can see this easily by doing this: $ ./openvpn --verb 4 --dev tun | grep tmp_dir Signed-off-by: David Sommerseth <davids@redhat.com> Tested-by: Jan Just Keijser <janjust@nikhef.nl> Acked-by: Gert Doering <gert@greenie.muc.de> (cherry picked from commit ca4c6d618d743ec4a3b6f7ef8003d891603ec1a6)
Diffstat (limited to 'plugin/defer/winbuild')
0 files changed, 0 insertions, 0 deletions