]> git.ipfire.org Git - thirdparty/curl.git/commit
tool_dirhie: Allow directory traversal during creation
authorJay Satiro <raysatiro@yahoo.com>
Wed, 8 Jan 2020 00:44:51 +0000 (19:44 -0500)
committerJay Satiro <raysatiro@yahoo.com>
Thu, 9 Jan 2020 19:24:53 +0000 (14:24 -0500)
commit4027bd72d9f0add0135e08cc7e1860cc1385f21f
treee9f9e442912d7d3e5f6918d3dc4503a66a885fb7
parent446665606c3db116c02a68dac0b5a0626c517bf7
tool_dirhie: Allow directory traversal during creation

- When creating a directory hierarchy do not error when mkdir fails due
  to error EACCESS (13) "access denied".

Some file systems allow for directory traversal; in this case that it
should be possible to create child directories when permission to the
parent directory is restricted.

This is a regression caused by me in f16bed0 (precedes curl-7_61_1).
Basically I had assumed that if a directory already existed it would
fail only with error EEXIST, and not error EACCES. The latter may
happen if the directory exists but has certain restricted permissions.

Reported-by: mbeifuss@users.noreply.github.com
Fixes https://github.com/curl/curl/issues/4796
Closes https://github.com/curl/curl/pull/4797
src/tool_dirhie.c