From 6f94529f31cfab709c07d5e012ecc16cc9228d3c Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Mon, 26 Apr 2010 09:50:30 +0200 Subject: [PATCH] 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 Acked-by: James Yonan --- misc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/misc.c b/misc.c index 0ceeb2d09..1f7f616c6 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; } } -- 2.47.2