Skip to content

Commit 2f8cbf5

Browse files
schwabecron2
authored andcommitted
fix key_state_gen_auth_control_files probably checking file creation
When the auth_failed_reason_file was added, it was forgotten to also add it to the conditions that determine if the file creation was successful. Reported-by: Joshua Rogers <[email protected]> Found-by: ZeroPath (https://zeropath.com/) Change-Id: I94d2bdd234a1c416b78924d044bf7e57f1bed8c4 Signed-off-by: Arne Schwabe <[email protected]> Acked-by: Gert Doering <[email protected]> Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1327 Message-Id: <[email protected]> URL: https://www.mail-archive.com/[email protected]/msg34067.html Signed-off-by: Gert Doering <[email protected]>
1 parent 3fbba25 commit 2f8cbf5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/openvpn/ssl_verify.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,7 @@ key_state_gen_auth_control_files(struct auth_deferred_status *ads, const struct
992992
const char *apf = platform_create_temp_file(opt->tmp_dir, "apf", &gc);
993993
const char *afr = platform_create_temp_file(opt->tmp_dir, "afr", &gc);
994994

995-
if (acf && apf)
995+
if (acf && apf && afr)
996996
{
997997
ads->auth_control_file = string_alloc(acf, NULL);
998998
ads->auth_pending_file = string_alloc(apf, NULL);
@@ -1004,7 +1004,7 @@ key_state_gen_auth_control_files(struct auth_deferred_status *ads, const struct
10041004
}
10051005

10061006
gc_free(&gc);
1007-
return (acf && apf);
1007+
return (acf && apf && afr);
10081008
}
10091009

10101010
/**

0 commit comments

Comments
 (0)