Skip to contentSkip to conversation

Fix tmp-dir documentation

PATCH In review Klemens Nanni 3 participants 3 messages Apr 26, 2025 – Apr 28, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix tmp-dir documentation

Mention its default (on non-Windows systems), rephrase for brevity, fix grammar, correct the module environment variable name and remove a wrong default mentioned in a related option.

---
 doc/man-sections/generic-options.rst | 11 +++++------
 doc/man-sections/script-options.rst  |  8 +++-----
 2 files changed, 8 insertions(+), 11 deletions(-)
doc/man-sections/generic-options.rst +5 -6
index ba9376be..882cf283 100644
@@ -454,12 +454,11 @@ which mode OpenVPN is configured as.
   independently of network and tunnel issues.
 
 --tmp-dir dir
-  Specify a directory ``dir`` for temporary files. This directory will be
-  used by openvpn processes and script to communicate temporary data with
-  openvpn main process. Note that the directory must be writable by the
-  OpenVPN process after it has dropped it's root privileges.
+  Specify a directory ``dir`` for temporary files instead of the default
+  :code:`TMPDIR` (or "/tmp" if unset). Note that it must be writable by the main
+  process after it has dropped root privileges.
 
-  This directory will be used by in the following cases:
+  This directory will be used to communicate with scripts and plugins:
 
   * ``--client-connect`` scripts and :code:`OPENVPN_PLUGIN_CLIENT_CONNECT`
     plug-in hook to dynamically generate client-specific configuration
@@ -469,7 +468,7 @@ which mode OpenVPN is configured as.
 
   * :code:`OPENVPN_PLUGIN_AUTH_USER_PASS_VERIFY` plug-in hooks returns
     success/failure via :code:`auth_control_file` when using deferred auth
-    method and pending authentication via :code:`pending_auth_file`.
+    method and pending authentication via :code:`auth_pending_file`.
 
 --use-prediction-resistance
   Enable prediction resistance on mbed TLS's RNG.
doc/man-sections/script-options.rst +3 -5
index 0d1f9aec..e48710ba 100644
@@ -87,11 +87,9 @@ SCRIPT HOOKS
   and password to the first two lines of a temporary file. The filename
   will be passed as an argument to ``cmd``, and the file will be
   automatically deleted by OpenVPN after the script returns. The location
-  of the temporary file is controlled by the ``--tmp-dir`` option, and
-  will default to the current directory if unspecified. For security,
-  consider setting ``--tmp-dir`` to a volatile storage medium such as
-  :code:`/dev/shm` (if available) to prevent the username/password file
-  from touching the hard drive.
+  of the temporary file is controlled by the ``--tmp-dir`` option. For security,
+  consider setting it to a volatile storage medium such as :code:`/dev/shm` (if
+  available) to prevent the username/password file from touching the hard drive.
 
   The script should examine the username and password, returning a success
   exit code (:code:`0`) if the client's authentication request is to be
Signature · 1 line
2.49.0
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Klemens Nanni

Mention its default (on non-Windows systems), rephrase for brevity, fix grammar, correct the module environment variable name and remove a wrong default mentioned in a related option.

---
 doc/man-sections/generic-options.rst | 11 +++++------
 doc/man-sections/script-options.rst  |  8 +++-----
 2 files changed, 8 insertions(+), 11 deletions(-)

Comparing to the source code this looks correct to me.

Regards,

Signature · 1 line
  Frank Lichtenheld
#2 lore raw
In reply to Klemens Nanni

Thanks, documentation improvements are always welcome.

Your patch has been applied to the master and release/2.6 branch ("documentation improvement").

commit 9ecaf2400a7b399166c0698c30d413b91cd4f534 (master) commit 6ca0fb4a0966c7dc80de4c45472281246961ad52 (release/2.6)

Author: Klemens Nanni
Date:   Sat Apr 26 15:19:03 2025 +0300
     Fix tmp-dir documentation

     Acked-by: Frank Lichtenheld <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg31514.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering