]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Add a remark on dropping privileges when --mlock is used
authorSelva Nair <selva.nair@gmail.com>
Wed, 9 Sep 2020 22:15:29 +0000 (18:15 -0400)
committerGert Doering <gert@greenie.muc.de>
Fri, 11 Sep 2020 09:52:29 +0000 (11:52 +0200)
trac #1059

Signed-off-by: Selva Nair <selva.nair@gmail.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <1599689729-25906-1-git-send-email-selva.nair@gmail.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg20937.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
doc/man-sections/generic-options.rst

index a07fe7e7d76c0c7dbe66a6088fd5e87a1e64ef18..d5f08839b10368d79b2c2d611efc922653718e2f 100644 (file)
@@ -230,6 +230,13 @@ which mode OpenVPN is configured as.
   The downside of using ``--mlock`` is that it will reduce the amount of
   physical memory available to other applications.
 
+  The limit on how much memory can be locked and how that limit
+  is enforced are OS-dependent. On Linux the default limit that an
+  unprivileged process may lock (RLIMIT_MEMLOCK) is low, and if
+  privileges are dropped later, future memory allocations will very
+  likely fail. The limit can be increased using ulimit or systemd
+  directives depending on how OpenVPN is started.
+
 --nice n
   Change process priority after initialization (``n`` greater than 0 is
   lower priority, ``n`` less than zero is higher priority).