Codebase list openssl / 4522e13
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
1 changed file(s) with 2 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
681681 return -1;
682682 case '<':
683683 /* 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;
690685 case '>':
691686 /* 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;
698688 case 'p':
699689 case 'n':
700690 if (!opt_int(arg, &ival)