When invoking openvpn as standalone with the --genkey
argument, options_postprocess() is not called at all
because do_genkey() takes over the execution earlier.

For this reason, checking the --genkey argument in
options_postprocess_filechecks() is a no-op.

Geti rid of the bogus check altogether.

Signed-off-by: Antonio Quartulli <[email protected]>
---
 src/openvpn/options.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/openvpn/options.c b/src/openvpn/options.c
index 63dc53c3..a8394c6c 100644
--- a/src/openvpn/options.c
+++ b/src/openvpn/options.c
@@ -3420,9 +3420,6 @@ options_postprocess_filechecks(struct options *options)
                                   "--tls-crypt-v2");
     }
 
-    errs |= check_file_access(CHKACC_FILE|CHKACC_INLINE|CHKACC_PRIVATE,
-                              options->genkey_filename, R_OK,
-                              "--genkey");
     errs |= check_file_access(CHKACC_FILE|CHKACC_INLINE|CHKACC_PRIVATE,
                               options->shared_secret_file, R_OK, "--secret");
 
-- 
2.26.1



_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to