Commit 4522e130 authored by Richard Levitte's avatar Richard Levitte
Browse files

apps/opt.c: Remove the access checks of input and output files



open() will take care of the checks anyway

Reviewed-by: default avatarAndy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6033)
parent c36e9093
Loading
Loading
Loading
Loading
+2 −12
Original line number Diff line number Diff line
@@ -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;
        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;
        case 'p':
        case 'n':
            if (!opt_int(arg, &ival)