From: Antonio Quartulli Date: Fri, 7 Jul 2017 14:01:08 +0000 (+0800) Subject: management: preserve wait_for_push field when asking for user/pass X-Git-Tag: v2.5_beta1~633 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3322c558fa742cb823fa919f682486973abc4f8e;p=thirdparty%2Fopenvpn.git management: preserve wait_for_push field when asking for user/pass With the introduction of the wait_for_push field in the auth_user_pass structure, we have to make sure that such field is not accidentally erased when the management asks the user for user/pass. Erasing such field would mess up the logic introduced by ("Ignore auth-nocache for auth-user-pass if auth-token is pushed"). Thanks to David Sommerseth for the preliminary analysis and debugging. Reported-by: Steven Haigh Signed-off-by: Antonio Quartulli Tested-by: Steven Haigh Acked-by: David Sommerseth Message-Id: <20170707140108.31612-1-a@unstable.cc> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg15015.html Signed-off-by: David Sommerseth --- diff --git a/src/openvpn/manage.c b/src/openvpn/manage.c index 13be6f6d7..ff9482404 100644 --- a/src/openvpn/manage.c +++ b/src/openvpn/manage.c @@ -3501,7 +3501,9 @@ management_query_user_pass(struct management *man, */ if (ret) { - man->connection.up_query.nocache = up->nocache; /* preserve caller's nocache setting */ + /* preserve caller's settings */ + man->connection.up_query.nocache = up->nocache; + man->connection.up_query.wait_for_push = up->wait_for_push; *up = man->connection.up_query; } secure_memzero(&man->connection.up_query, sizeof(man->connection.up_query));