]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
remove bogus file check on --genkey argument
authorAntonio Quartulli <a@unstable.cc>
Mon, 20 Apr 2020 10:21:02 +0000 (12:21 +0200)
committerGert Doering <gert@greenie.muc.de>
Mon, 20 Apr 2020 10:28:04 +0000 (12:28 +0200)
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 <a@unstable.cc>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20200420102102.20981-1-a@unstable.cc>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg19795.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/options.c

index 63dc53c3c137ae9230da735d698c0161af411b70..a8394c6c3fecc3c809b955495f05ad86ca49c6b2 100644 (file)
@@ -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");