1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-03 13:47:25 +03:00

smbd: remove initial stat() EACCES handling from unix_convert()

This was added by bd90ca6f00b (my bad) but it breaks filesystems with NFS4
permissions.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Apr 23 19:50:38 UTC 2020 on sn-devel-184
This commit is contained in:
Ralph Boehme 2020-04-23 10:48:51 +02:00 committed by Jeremy Allison
parent fdfc480a56
commit 205acab580

View File

@ -700,17 +700,12 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx,
/* Stat failed - ensure we don't use it. */
SET_STAT_INVALID(smb_fname->st);
if (errno == EACCES) {
/*
* Early exit on access denied. Walking
* the path won't fix that.
*/
DBG_DEBUG("stat [%s]: %s\n",
smb_fname_str_dbg(smb_fname),
strerror(errno));
status = NT_STATUS_ACCESS_DENIED;
goto fail;
}
/*
* Note: we must continue processing a path if we get EACCES
* from stat. With NFS4 permissions the file might be lacking
* READ_ATTR, but if the parent has LIST permissions we can
* resolve the path in the path traversal loop down below.
*/
if (errno == ENOENT) {
/* Optimization when creating a new file - only