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:
parent
fdfc480a56
commit
205acab580
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user