summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2018-04-24 14:31:32 +0200
committerRichard Levitte <levitte@openssl.org>2018-04-25 11:44:26 +0200
commit4522e130c87c341342c640bba970f4b89755f1cb (patch)
tree00564db55c81ff5d8de45eca6710b0788ba6659f /apps
parentc36e9093914aab4bfc42af1db35558a9272607b5 (diff)
apps/opt.c: Remove the access checks of input and output files
open() will take care of the checks anyway Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6033)
Diffstat (limited to 'apps')
-rw-r--r--apps/opt.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/apps/opt.c b/apps/opt.c
index 4d06983241..cc1418449e 100644
--- a/apps/opt.c
+++ b/apps/opt.c
@@ -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)