diff options
author | David Sommerseth <dazo@users.sourceforge.net> | 2010-04-26 09:50:30 +0200 |
---|---|---|
committer | David Sommerseth <dazo@users.sourceforge.net> | 2010-10-21 11:40:21 +0200 |
commit | 6f94529f31cfab709c07d5e012ecc16cc9228d3c (patch) | |
tree | 29536be56dce28dae79eaafb47632b29817da344 | |
parent | Fix certificate serial number export (diff) | |
download | openvpn-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.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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; } } |