openssl/util
Alex Yursha af2e1e9c81 Print correct error message in utils/mkdir-p.pl
Commit 70a56b9147 introduced a regression.

If utils/mkdir-p.pl fails to create a target dir because of insufficient file system
permissions, the subsequent test for dir existence always fails and overwrites
the system error. As a result, a user is presented with a misleading error message.

E.g. if a user tries to create a dir under /usr/local and does not have permissions
for it, the reported error message is "Cannot create directory /usr/local/lib: No such file or directory",
whereas the expected error message is "Cannot create directory /usr/local/lib: Permission denied".

This commit introduces a fix by declaring an additional local variable to cache
the original error message from mkdir. If -d check fails and overwrites the system
error, the user is still presented with the original error from mkdir.

CLA: Trivial

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14487)
2021-03-30 19:13:08 +02:00
..
perl Teach TLSProxy how to encrypt <= TLSv1.2 ETM records 2021-03-25 09:48:08 +00:00
add-depends.pl
build.info
cavs-to-evptest.pl
check-format-test-negatives.c
check-format-test-positives.c
check-format.pl
check-malloc-errs
ck_errf.pl
copy.pl
dofile.pl
echo.pl
engines.num
err-to-raise
find-doc-nits
find-unused-errs
fix-deprecation
fix-includes
fix-includes.sed
indent.pro
libcrypto.num Implement EVP_PKEY_dup() function 2021-03-28 16:38:57 +10:00
libssl.num
local_shlib.com.in
markdownlint.rb
merge-err-lines
missingcrypto111.txt
missingcrypto-internal.txt
missingcrypto.txt Dual 1024-bit exponentiation optimization for Intel IceLake CPU 2021-03-22 09:48:00 +00:00
missingmacro111.txt
missingmacro.txt
missingssl111.txt
missingssl-internal.txt
missingssl.txt
mkbuildinf.pl
mkdef.pl
mkdir-p.pl Print correct error message in utils/mkdir-p.pl 2021-03-30 19:13:08 +02:00
mkerr.pl
mknum.pl
mkpod2html.pl
mkrc.pl
mktar.sh
opensslwrap.sh
other-internal.syms
other.syms
providers.num
shlib_wrap.sh.in Add explicit support in util/shlib_wrap.sh.in for NonStop DLL loading. 2021-03-30 19:08:32 +02:00
su-filter.pl
unlocal_shlib.com.in
withlibctx.pl
wrap.pl