From: David Sommerseth <d...@users.sourceforge.net>

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.

Signed-off-by: David Sommerseth <d...@users.sourceforge.net>
---
 misc.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/misc.c b/misc.c
index 643ffad..7052584 100644
--- a/misc.c
+++ b/misc.c
@@ -1588,14 +1588,16 @@ void
 purge_user_pass (struct user_pass *up, const bool force)
 {
   const bool nocache = up->nocache;
+  static 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;
     }
 }

-- 
1.6.6.1


Reply via email to