diff options
author | James Yonan <james@openvpn.net> | 2011-08-19 03:15:25 +0000 |
---|---|---|
committer | David Sommerseth <davids@redhat.com> | 2011-08-24 14:05:13 +0200 |
commit | ca18a638aa7cf316611f893127ba44131e57083c (patch) | |
tree | 3cc5ffb833fc154b050d9963ca6ee8252db77190 /ssl.c | |
parent | 2627335ac2605d0987a68ce97a0a2c4efbe25159 (diff) | |
download | openvpn-ca18a638aa7cf316611f893127ba44131e57083c.tar.gz openvpn-ca18a638aa7cf316611f893127ba44131e57083c.tar.xz openvpn-ca18a638aa7cf316611f893127ba44131e57083c.zip |
"status" management interface command (version >= 2) will now
include the username for each connected user. This should
generally be backward compatible with existing management
interface clients since the new username field is added
to the CLIENT_LIST header as well.
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@7539 e7ae566f-a301-0410-adde-c780ea21d3b5
Conflicts:
multi.c - hash_iterator_init() takes only 2 arguments now.
Signed-off-by: David Sommerseth <davids@redhat.com>
Diffstat (limited to 'ssl.c')
-rw-r--r-- | ssl.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -1404,6 +1404,20 @@ tls_lock_username (struct tls_multi *multi, const char *username) return true; } +const char * +tls_username (const struct tls_multi *multi, const bool null) +{ + const char *ret = NULL; + if (multi) + ret = multi->locked_username; + if (ret && strlen (ret)) + return ret; + else if (null) + return NULL; + else + return "UNDEF"; +} + #ifdef ENABLE_X509_TRACK void |