mirror of
https://github.com/samba-team/samba.git
synced 2025-02-02 09:47:23 +03:00
Move SET_STAT_INVALID call added by Volker as fix for bug 8042 - Newly create files are always failed with NT_STATUS_FILE_IS_A_DIRECTORY
Ensure we do this for all cases where the stat fails. Jeremy Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Mon Apr 4 20:08:45 CEST 2011 on sn-devel-104
This commit is contained in:
parent
074239ac2e
commit
2ec48260ee
@ -440,6 +440,9 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx,
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Stat failed - ensure we don't use it. */
|
||||
SET_STAT_INVALID(smb_fname->st);
|
||||
|
||||
if (errno == ENOENT) {
|
||||
/* Optimization when creating a new file - only
|
||||
the last component doesn't exist. */
|
||||
@ -506,9 +509,6 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx,
|
||||
}
|
||||
}
|
||||
|
||||
/* Stat failed - ensure we don't use it. */
|
||||
SET_STAT_INVALID(smb_fname->st);
|
||||
|
||||
/*
|
||||
* Missing last component is ok - new file.
|
||||
* Also deal with permission denied elsewhere.
|
||||
|
Loading…
x
Reference in New Issue
Block a user