mirror of
https://github.com/OpenVPN/openvpn.git
synced 2024-09-20 12:02:28 +02:00
Fix compiling with --disable-crypto and/or --disable-ssl
The checks introduced in commit 0f2bc0dd92
didn't properly remove checks if crypto or SSL was disabled at compile time.
Signed-off-by: David Sommerseth <davids@redhat.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
This commit is contained in:
parent
e3f1b6a1f2
commit
1d5c4433cd
10
options.c
10
options.c
@ -2691,10 +2691,11 @@ options_postprocess_filechecks (struct options *options)
|
|||||||
errs |= check_file_access (CHKACC_FILE, options->management_user_pass, R_OK,
|
errs |= check_file_access (CHKACC_FILE, options->management_user_pass, R_OK,
|
||||||
"--management user/password file");
|
"--management user/password file");
|
||||||
#endif /* ENABLE_MANAGEMENT */
|
#endif /* ENABLE_MANAGEMENT */
|
||||||
|
#if P2MP
|
||||||
if( options->auth_user_pass_file && strcmp(options->auth_user_pass_file, "stdin") != 0 )
|
if( options->auth_user_pass_file && strcmp(options->auth_user_pass_file, "stdin") != 0 )
|
||||||
errs |= check_file_access (CHKACC_FILE, options->auth_user_pass_file, R_OK,
|
errs |= check_file_access (CHKACC_FILE, options->auth_user_pass_file, R_OK,
|
||||||
"--auth-user-pass");
|
"--auth-user-pass");
|
||||||
|
#endif /* P2MP */
|
||||||
|
|
||||||
/* ** System related ** */
|
/* ** System related ** */
|
||||||
errs |= check_file_access (CHKACC_FILE, options->chroot_dir,
|
errs |= check_file_access (CHKACC_FILE, options->chroot_dir,
|
||||||
@ -2709,15 +2710,14 @@ options_postprocess_filechecks (struct options *options)
|
|||||||
R_OK|W_OK, "--status");
|
R_OK|W_OK, "--status");
|
||||||
|
|
||||||
/* ** Config related ** */
|
/* ** Config related ** */
|
||||||
#ifdef USE_CRYPTO
|
#ifdef USE_SSL
|
||||||
errs |= check_file_access (CHKACC_FILE, options->tls_export_cert,
|
errs |= check_file_access (CHKACC_FILE, options->tls_export_cert,
|
||||||
R_OK|W_OK|X_OK, "--tls-export-cert");
|
R_OK|W_OK|X_OK, "--tls-export-cert");
|
||||||
#endif /* USE_CRYPTO */
|
#endif /* USE_SSL */
|
||||||
|
#if P2MP_SERVER
|
||||||
errs |= check_file_access (CHKACC_FILE, options->client_config_dir,
|
errs |= check_file_access (CHKACC_FILE, options->client_config_dir,
|
||||||
R_OK|X_OK, "--client-config-dir");
|
R_OK|X_OK, "--client-config-dir");
|
||||||
|
|
||||||
/* ** Script hooks ** */
|
/* ** Script hooks ** */
|
||||||
#if P2MP_SERVER
|
|
||||||
errs |= check_file_access (CHKACC_FILE, options->client_connect_script,
|
errs |= check_file_access (CHKACC_FILE, options->client_connect_script,
|
||||||
R_OK|X_OK, "--client-connect script");
|
R_OK|X_OK, "--client-connect script");
|
||||||
errs |= check_file_access (CHKACC_FILE, options->client_disconnect_script,
|
errs |= check_file_access (CHKACC_FILE, options->client_disconnect_script,
|
||||||
|
Loading…
Reference in New Issue
Block a user