aboutsummaryrefslogtreecommitdiff
path: root/manage.c
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2008-01-23 00:19:51 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2008-01-23 00:19:51 +0000
commita032fcb7bcd9d8efbc2d9254651706e6da57b94e (patch)
treeb3be2fd24819bdac07f7cd91be176509f262a2f3 /manage.c
parentUpgraded TAP build scripts to use WDK 6001.17121 (diff)
downloadopenvpn-a032fcb7bcd9d8efbc2d9254651706e6da57b94e.tar.xz
Added --management-forget-disconnect option -- forget
passwords when management session disconnects (Alon Bar-Lev). git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2652 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to '')
-rw-r--r--manage.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/manage.c b/manage.c
index b6f8bcf..558b01b 100644
--- a/manage.c
+++ b/manage.c
@@ -1080,6 +1080,9 @@ man_reset_client_socket (struct management *man, const bool exiting)
}
if (!exiting)
{
+ if (man->settings.management_forget_disconnect)
+ ssl_purge_auth ();
+
if (man->settings.signal_on_disconnect) {
int mysig = man_mod_signal (man, SIGUSR1);
if (mysig >= 0)
@@ -1333,6 +1336,7 @@ man_settings_init (struct man_settings *ms,
const int state_buffer_size,
const bool hold,
const bool signal_on_disconnect,
+ const bool management_forget_disconnect,
const bool connect_as_client,
const char *write_peer_info_file,
const int remap_sigusr1)
@@ -1371,6 +1375,12 @@ man_settings_init (struct man_settings *ms,
ms->signal_on_disconnect = signal_on_disconnect;
/*
+ * Should OpenVPN forget passwords when managmenet
+ * session disconnects?
+ */
+ ms->management_forget_disconnect = management_forget_disconnect;
+
+ /*
* Should OpenVPN connect to management interface as a client
* rather than a server?
*/
@@ -1513,6 +1523,7 @@ management_open (struct management *man,
const int state_buffer_size,
const bool hold,
const bool signal_on_disconnect,
+ const bool management_forget_disconnect,
const bool connect_as_client,
const char *write_peer_info_file,
const int remap_sigusr1)
@@ -1534,6 +1545,7 @@ management_open (struct management *man,
state_buffer_size,
hold,
signal_on_disconnect,
+ management_forget_disconnect,
connect_as_client,
write_peer_info_file,
remap_sigusr1);