diff options
author | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2007-08-17 08:22:42 +0000 |
---|---|---|
committer | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2007-08-17 08:22:42 +0000 |
commit | 70f4f82a3517cdb21f66899eac63fbd4543b07f2 (patch) | |
tree | 9180589380a99e07c6bf88efb0e24d6f8493cf57 | |
parent | config-win32.h and install-win32/openvpn.nsi are no longer generated (diff) | |
download | openvpn-70f4f82a3517cdb21f66899eac63fbd4543b07f2.tar.xz |
AUTO_USERID feature -- if the auth-user-pass option is used
with some argument ARG, then -ARG will be appended to the
username string that is sent to the server.
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2259 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to '')
-rw-r--r-- | misc.c | 4 | ||||
-rw-r--r-- | misc.h | 2 | ||||
-rw-r--r-- | ssl.c | 2 |
3 files changed, 5 insertions, 3 deletions
@@ -1356,7 +1356,7 @@ get_platform_prefix (void) } void -get_user_pass_auto_userid (struct user_pass *up) +get_user_pass_auto_userid (struct user_pass *up, const char *tag) { struct gc_arena gc = gc_new (); MD5_CTX ctx; @@ -1381,6 +1381,8 @@ get_user_pass_auto_userid (struct user_pass *up) { buf_printf (&buf, "UNKNOWN"); } + if (tag && strcmp (tag, "stdin")) + buf_printf (&buf, "-%s", tag); up->defined = true; gc_free (&gc); @@ -266,7 +266,7 @@ void openvpn_sleep (const int n); void configure_path (void); #if AUTO_USERID -void get_user_pass_auto_userid (struct user_pass *up); +void get_user_pass_auto_userid (struct user_pass *up, const char *tag); #endif #endif @@ -298,7 +298,7 @@ auth_user_pass_setup (const char *auth_file) if (!auth_user_pass.defined) { #if AUTO_USERID - get_user_pass_auto_userid (&auth_user_pass); + get_user_pass_auto_userid (&auth_user_pass, auth_file); #else get_user_pass (&auth_user_pass, auth_file, UP_TYPE_AUTH, GET_USER_PASS_MANAGEMENT|GET_USER_PASS_SENSITIVE); #endif |