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)
Richard Levitte
6 years ago
681 | 681 | return -1; |
682 | 682 | case '<': |
683 | 683 | /* Input file. */ |
684 | if (strcmp(arg, "-") == 0 || app_access(arg, R_OK) == 0) | |
685 | break; | |
686 | BIO_printf(bio_err, | |
687 | "%s: Cannot open input file %s, %s\n", | |
688 | prog, arg, strerror(errno)); | |
689 | return -1; | |
684 | break; | |
690 | 685 | case '>': |
691 | 686 | /* Output file. */ |
692 | if (strcmp(arg, "-") == 0 || app_access(arg, W_OK) == 0 || errno == ENOENT) | |
693 | break; | |
694 | BIO_printf(bio_err, | |
695 | "%s: Cannot open output file %s, %s\n", | |
696 | prog, arg, strerror(errno)); | |
697 | return -1; | |
687 | break; | |
698 | 688 | case 'p': |
699 | 689 | case 'n': |
700 | 690 | if (!opt_int(arg, &ival) |