aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Sommerseth <dazo@users.sourceforge.net>2010-04-26 09:50:30 +0200
committerDavid Sommerseth <dazo@users.sourceforge.net>2010-10-21 11:40:21 +0200
commit6f94529f31cfab709c07d5e012ecc16cc9228d3c (patch)
tree29536be56dce28dae79eaafb47632b29817da344
parentFix certificate serial number export (diff)
downloadopenvpn-6f94529f31cfab709c07d5e012ecc16cc9228d3c.tar.xz
Avoid repetition of "this config may cache passwords in memory" (v2)
For OpenVPN clients with long living connections, this message is repeated everytime the connection is renegotiated. This patch removes this behaviour and will only show this warning once. Patch ACKed on the developers meeting 2009-04-29. Signed-off-by: David Sommerseth <dazo@users.sourceforge.net> Acked-by: James Yonan <james@openvpn.net>
-rw-r--r--misc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/misc.c b/misc.c
index 0ceeb2d..1f7f616 100644
--- a/misc.c
+++ b/misc.c
@@ -1594,14 +1594,16 @@ void
purge_user_pass (struct user_pass *up, const bool force)
{
const bool nocache = up->nocache;
+ static bool warn_shown = false;
if (nocache || force)
{
CLEAR (*up);
up->nocache = nocache;
}
- else
+ else if (!warn_shown)
{
msg (M_WARN, "WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this");
+ warn_shown = true;
}
}