Attention is currently required from: flichtenheld. Hello flichtenheld,
I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/871?usp=email to review the following change. Change subject: Remove comparing username to NULL in tls_lock_username ...................................................................... Remove comparing username to NULL in tls_lock_username tls_lock_username is only called in a single place and that place calls this is function with up->username, which is always defined. Change-Id: Ib8adf7b31cae02e2de3d45da23b76a2d79f13e20 Signed-off-by: Arne Schwabe <a...@rfc2549.org> --- M src/openvpn/ssl_verify.c 1 file changed, 3 insertions(+), 6 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/71/871/1 diff --git a/src/openvpn/ssl_verify.c b/src/openvpn/ssl_verify.c index 4c4b58d..e7d7ed6 100644 --- a/src/openvpn/ssl_verify.c +++ b/src/openvpn/ssl_verify.c @@ -153,11 +153,11 @@ { if (multi->locked_username) { - if (!username || strcmp(username, multi->locked_username)) + if (strcmp(username, multi->locked_username) != 0) { msg(D_TLS_ERRORS, "TLS Auth Error: username attempted to change from '%s' to '%s' -- tunnel disabled", multi->locked_username, - np(username)); + username); /* disable the tunnel */ tls_deauthenticate(multi); @@ -166,10 +166,7 @@ } else { - if (username) - { - multi->locked_username = string_alloc(username, NULL); - } + multi->locked_username = string_alloc(username, NULL); } return true; } -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/871?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Ib8adf7b31cae02e2de3d45da23b76a2d79f13e20 Gerrit-Change-Number: 871 Gerrit-PatchSet: 1 Gerrit-Owner: plaisthos <arne-open...@rfc2549.org> Gerrit-Reviewer: flichtenheld <fr...@lichtenheld.com> Gerrit-CC: openvpn-devel <openvpn-devel@lists.sourceforge.net> Gerrit-Attention: flichtenheld <fr...@lichtenheld.com> Gerrit-MessageType: newchange
_______________________________________________ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel