summaryrefslogtreecommitdiffstats
path: root/options.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 /options.c
parent44b3dcc8927c4bde391792a4632198cecba29f8d (diff)
downloadopenvpn-a032fcb7bcd9d8efbc2d9254651706e6da57b94e.tar.gz
openvpn-a032fcb7bcd9d8efbc2d9254651706e6da57b94e.tar.xz
openvpn-a032fcb7bcd9d8efbc2d9254651706e6da57b94e.zip
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 'options.c')
-rw-r--r--options.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/options.c b/options.c
index a990fcd..9908a33 100644
--- a/options.c
+++ b/options.c
@@ -318,6 +318,8 @@ static const char usage_message[] =
"--management-hold : Start " PACKAGE_NAME " in a hibernating state, until a client\n"
" of the management interface explicitly starts it.\n"
"--management-signal : Issue SIGUSR1 when management disconnect event occurs.\n"
+ "--management-forget-disconnect : Forget passwords when management disconnect\n"
+ " event occurs.\n"
"--management-log-cache n : Cache n lines of log file history for usage\n"
" by the management channel.\n"
#endif
@@ -1202,6 +1204,7 @@ show_settings (const struct options *o)
SHOW_BOOL (management_hold);
SHOW_BOOL (management_client);
SHOW_BOOL (management_signal);
+ SHOW_BOOL (management_forget_disconnect);
SHOW_STR (management_write_peer_info_file);
#endif
#ifdef ENABLE_PLUGIN
@@ -1527,7 +1530,8 @@ options_postprocess (struct options *options, bool first_time)
#ifdef ENABLE_MANAGEMENT
if (!options->management_addr &&
(options->management_query_passwords || options->management_hold || options->management_signal
- || options->management_client || options->management_write_peer_info_file
+ || options->management_forget_disconnect || options->management_client
+ || options->management_write_peer_info_file
|| options->management_log_history_cache != defaults.management_log_history_cache))
msg (M_USAGE, "--management is not specified, however one or more options which modify the behavior of --management were specified");
#endif
@@ -3152,6 +3156,11 @@ add_option (struct options *options,
VERIFY_PERMISSION (OPT_P_GENERAL);
options->management_signal = true;
}
+ else if (streq (p[0], "management-forget-disconnect"))
+ {
+ VERIFY_PERMISSION (OPT_P_GENERAL);
+ options->management_forget_disconnect = true;
+ }
else if (streq (p[0], "management-client"))
{
VERIFY_PERMISSION (OPT_P_GENERAL);