management: preserve wait_for_push field when asking for user/pass
PATCH 1/1 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.
--- src/openvpn/manage.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
src/openvpn/manage.c +3 -1
@@ -3504,7 +3504,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));
Signature · 1 line
2.13.2
For what its worth, further testing has shown that this works fine with ~8 hours connection and 'reneg-sec 1800'
More than happy to call this resolved.
Quoted 35 lines · Antonio Quartulli
With the introduction of the
wait_for_pushfield in theauth_user_passstructure, 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 <[email protected]...>Signed-off-by Antonio Quartulli <[email protected]...>Tested-by Steven Haigh <[email protected]...>--- src/openvpn/manage.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)src/openvpn/manage.c +0
-1@@ -3504,7 +3504,9 @@ management_query_user_pass(struct management*man, */ if (ret) { - man->connection.up_query.nocache = up->nocache;/* preserve caller's nocache setting */
src/openvpn/manage.c +3
-0+/* 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));
Signature · 4 lines
Steven Haigh ? [email protected]... ? http://www.crc.id.au ? +61 (3) 9001 6090 ? 0412 935 897
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
ACK. Tested and glared at code. This matches quite well the analyzsis I had done before Antonio took over and completed. And it works as expected.
Your patch has been applied to the following branches
commit 3322c558fa742cb823fa919f682486973abc4f8e (master) commit e7ae4040efc5c48e00374f8863da58eef32e0709 (release/2.4)
Author: Antonio Quartulli Date: Fri Jul 7 22:01:08 2017 +0800
management: preserve wait_for_push field when asking for user/pass
Signed-off-by: Antonio Quartulli <[email protected]...>
Acked-by: David Sommerseth <[email protected]...>
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg15015.html
Signed-off-by: David Sommerseth <[email protected]...>- --
kind regards,
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
iQIcBAEBCgAGBQJZdfWwAAoJEIbPlEyWcf3yO8wQAIIkYjGfx0NjA/lbjm1qnEfq I4pc9sDgNGPo9NF5hWz+NDfkK6fxVjakW0fRJZe4HLXxrsSQIh64VX3BpfZglrIz gGvmbxrts9/TnXTwGhMOGZW/3GjwmhmUXT8yCxR0K8rOi41NNF8D6HmtDUxCI+Pa Tzfh5ddHgJu4E+kd+F1+k0CO6dyTyZCjuVSpT/MufGpZ0YcWr86F9xdtuzrprJda +FTpjpXD8eD8uHP3WTcrO+rGgWHkjoRErO+nlFwPSVH7Ob/Oc9xWL5ptjEmig/gW xBGRn+Sxp1GmDn326Wd4WdIYFqgdYlzs27/rR6xhDlmF9ger5EISYoETQuso5J2s GFKxjEV8IK8TJdSK8Fm5DyQNaOdTV5rwssUn6I6XDqJRDW4yNoyEEnVZKphYvTis eYBm2ckTjEvAs1dR9Of8LQUm/53aDwwzrkH/7pcZeo0rLIS05gpk6FUYtFFS1g8r yPxV6rrcCbDPozdXSiH0fF30jQDA/bmTkJJjJj54nDVPe4FAWNUvU4Kw7TH95O6c tEADa2hQl2kQwKY1eRVkA/PnA9rKx65WN1V8MU9NSC/gLuNC/IBqd90QL/aZ0l/Z I6ANDhbcNh0NkhFC+dQkS3InI/aFed0A1GpTNtzGswVRIpJ3LUGYGTKb8cQ0xr5c e2l7cIMeTzme9pyaybfu
=BxCy
-----END PGP SIGNATURE-----