From: David Sommerseth Date: Fri, 2 Dec 2011 15:32:56 +0000 (+0100) Subject: Don't look for 'stdin' file when using --auth-user-pass X-Git-Tag: v2.3-alpha1~53 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=870cf166add7ea0aa15c9d12b7916e669a9f441f;p=thirdparty%2Fopenvpn.git Don't look for 'stdin' file when using --auth-user-pass This argument allows the keyword 'stdin' to indicate that the input is to be read from the stdin. Don't check for file existence if the file name is set to 'stdin' Signed-off-by: David Sommerseth Acked-by: Gert Doering --- diff --git a/options.c b/options.c index 28296a561..3a819c972 100644 --- a/options.c +++ b/options.c @@ -2688,8 +2688,9 @@ options_postprocess_filechecks (struct options *options) errs |= check_file_access (CHKACC_FILE, options->management_user_pass, R_OK, "--management user/password file"); #endif /* ENABLE_MANAGEMENT */ - errs |= check_file_access (CHKACC_FILE, options->auth_user_pass_file, R_OK, - "--auth-user-pass"); + 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, + "--auth-user-pass"); /* ** System related ** */