diff options
author | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2008-05-24 23:26:11 +0000 |
---|---|---|
committer | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2008-05-24 23:26:11 +0000 |
commit | 344ee9181734dcd5a922b8b2a7ebea4ce818a0b0 (patch) | |
tree | 8a4c3724971a0c81debc97d3bba62138aab3a247 /misc.c | |
parent | Did: (diff) | |
download | openvpn-344ee9181734dcd5a922b8b2a7ebea4ce818a0b0.tar.xz |
Support asynchronous/deferred authentication in
OPENVPN_PLUGIN_AUTH_USER_PASS_VERIFY plugin handler.
See documentation in openvpn-plugin.h and example
usage in plugin/defer/simple.c.
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2969 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'misc.c')
-rw-r--r-- | misc.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -206,7 +206,7 @@ run_up_down (const char *command, ifconfig_local, ifconfig_remote, context); - if (plugin_call (plugins, plugin_type, BSTR (&cmd), NULL, es)) + if (plugin_call (plugins, plugin_type, BSTR (&cmd), NULL, es) != OPENVPN_PLUGIN_FUNC_SUCCESS) msg (M_FATAL, "ERROR: up/down plugin call failed"); } @@ -1053,7 +1053,7 @@ test_file (const char *filename) /* create a temporary filename in directory */ const char * -create_temp_filename (const char *directory, struct gc_arena *gc) +create_temp_filename (const char *directory, const char *prefix, struct gc_arena *gc) { static unsigned int counter; struct buffer fname = alloc_buf_gc (256, gc); @@ -1062,9 +1062,11 @@ create_temp_filename (const char *directory, struct gc_arena *gc) ++counter; mutex_unlock_static (L_CREATE_TEMP); - buf_printf (&fname, PACKAGE "_%u_%u.tmp", + buf_printf (&fname, PACKAGE "_%s_%u_%u_%u.tmp", + prefix, openvpn_getpid (), - counter); + counter, + (unsigned int)now); return gen_path (directory, BSTR (&fname), gc); } |