]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Don't look for 'stdin' file when using --auth-user-pass
authorDavid Sommerseth <davids@redhat.com>
Fri, 2 Dec 2011 15:32:56 +0000 (16:32 +0100)
committerDavid Sommerseth <davids@redhat.com>
Mon, 5 Dec 2011 10:35:28 +0000 (11:35 +0100)
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 <davids@redhat.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
options.c

index 28296a561d47b7e05196f03ccc14ca124cc58ae3..3a819c972b967b54b486deffcc8cadf95fb62b99 100644 (file)
--- 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 ** */