apps/opt.c: Remove the access checks of input and output files
authorRichard Levitte <levitte@openssl.org>
Tue, 24 Apr 2018 12:31:32 +0000 (14:31 +0200)
committerRichard Levitte <levitte@openssl.org>
Wed, 25 Apr 2018 09:44:26 +0000 (11:44 +0200)
open() will take care of the checks anyway

Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6033)

apps/opt.c

index 4d06983..cc14184 100644 (file)
@@ -682,20 +682,10 @@ int opt_next(void)
             return -1;
         case '<':
             /* Input file. */
-            if (strcmp(arg, "-") == 0 || app_access(arg, R_OK) == 0)
-                break;
-            BIO_printf(bio_err,
-                       "%s: Cannot open input file %s, %s\n",
-                       prog, arg, strerror(errno));
-            return -1;
+            break;
         case '>':
             /* Output file. */
-            if (strcmp(arg, "-") == 0 || app_access(arg, W_OK) == 0 || errno == ENOENT)
-                break;
-            BIO_printf(bio_err,
-                       "%s: Cannot open output file %s, %s\n",
-                       prog, arg, strerror(errno));
-            return -1;
+            break;
         case 'p':
         case 'n':
             if (!opt_int(arg, &ival)