From b910b08dcee353872ffa1c18a971d9b4a8feb213 Mon Sep 17 00:00:00 2001
From: Antonio Quartulli <a@unstable.cc>
Date: Fri, 7 Jul 2017 01:41:25 +0800
Subject: [PATCH] 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 <netwiz@crc.id.au>
Signed-off-by: Antonio Quartulli <a@unstable.cc>
---
src/openvpn/manage.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/openvpn/manage.c b/src/openvpn/manage.c
index c2e8dc72..e850e0a4 100644
a
|
b
|
management_query_user_pass(struct management *man, |
3504 | 3504 | */ |
3505 | 3505 | if (ret) |
3506 | 3506 | { |
3507 | | man->connection.up_query.nocache = up->nocache; /* preserve caller's nocache setting */ |
| 3507 | /* preserve caller's settings */ |
| 3508 | man->connection.up_query.nocache = up->nocache; |
| 3509 | man->connection.up_query.wait_for_push = up->wait_for_push; |
3508 | 3510 | *up = man->connection.up_query; |
3509 | 3511 | } |
3510 | 3512 | secure_memzero(&man->connection.up_query, sizeof(man->connection.up_query)); |