]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Add "forget-passwords" command to the management interface (Alon Bar-Lev).
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>
Mon, 22 Oct 2007 19:02:21 +0000 (19:02 +0000)
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>
Mon, 22 Oct 2007 19:02:21 +0000 (19:02 +0000)
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2412 e7ae566f-a301-0410-adde-c780ea21d3b5

manage.c
management/management-notes.txt

index 25e800cdf90544cd8202a5db2f044bfe3122bfe9..7323dd6f784c9867d8b8f2cf50649ad37d4b3794 100644 (file)
--- a/manage.c
+++ b/manage.c
@@ -40,6 +40,7 @@
 #include "otime.h"
 #include "integer.h"
 #include "misc.h"
+#include "ssl.h"
 #include "manage.h"
 
 #include "memdbg.h"
@@ -70,6 +71,7 @@ man_help ()
   msg (M_CLIENT, "bytecount n            : Show bytes in/out, update every n secs (0=off).");
   msg (M_CLIENT, "echo [on|off] [N|all]  : Like log, but only show messages in echo buffer.");
   msg (M_CLIENT, "exit|quit              : Close management session.");
+  msg (M_CLIENT, "forget-passwords       : Forget passwords entered so far.");
   msg (M_CLIENT, "help                   : Print this message.");
   msg (M_CLIENT, "hold [on|off|release]  : Set/show hold flag to on/off state, or"); 
   msg (M_CLIENT, "                         release current hold and start tunnel."); 
@@ -601,6 +603,13 @@ man_query_need_ok (struct management *man, const char *type, const char *action)
   man_query_user_pass (man, type, action, needed, "needok-confirmation", man->connection.up_query.password, USER_PASS_LEN);
 }
 
+static void
+man_forget_passwords (struct management *man)
+{
+  ssl_purge_auth ();
+  msg (M_CLIENT, "SUCCESS: Passwords were forgotten");
+}
+
 static void
 man_net (struct management *man)
 {
@@ -789,6 +798,10 @@ man_dispatch_command (struct management *man, struct status_output *so, const ch
       if (man_need (man, p, 2, 0))
        man_query_password (man, p[1], p[2]);
     }
+  else if (streq (p[0], "forget-passwords"))
+    {
+      man_forget_passwords (man);
+    }
   else if (streq (p[0], "needok"))
     {
       if (man_need (man, p, 2, 0))
index 292f7339104ede354c8eda502ecda1af91df6ddb..dcbc7ced9d4d89265b17b12959b2ae3dab94d34b 100644 (file)
@@ -268,6 +268,16 @@ COMMAND -- password and username
 
     >PASSWORD:Verification Failed: 'Auth'
 
+COMMAND -- forget-passwords
+---------------------------
+
+The forget-passwords command will cause the daemon to forget passwords
+entered during the session.
+
+Command example:
+
+  forget-passwords -- forget passwords entered so far.
+
 COMMAND -- signal
 -----------------