diff options
author | Volker Lendecke <vl@samba.org> | 2019-08-02 15:21:49 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2019-08-19 23:14:39 +0000 |
commit | 3bd7b119e6882aee04badc92f2ddbcbc1964c115 (patch) | |
tree | 83fcb00b83567fc71d785084cca5acd2e873cf2c | |
parent | f8fe0116c1158d8fdf0401ca46e8f12b84c04738 (diff) | |
download | samba-3bd7b119e6882aee04badc92f2ddbcbc1964c115.tar.gz |
smbd: Remove a late ref to "file_existed" in open_file_ntcreate()
If you follow "existing_dos_attributes" through the routine, this can
only ever be !=0 if SMB_VFS_GET_DOS_ATTRIBUTES() was successful. This
can only have been successful if the file existed.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
-rw-r--r-- | source3/smbd/open.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 23f80925840..77dd33b8378 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -3687,8 +3687,8 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn, /* POSIX opens are sparse by default. */ fsp->is_sparse = true; } else { - fsp->is_sparse = (file_existed && - (existing_dos_attributes & FILE_ATTRIBUTE_SPARSE)); + fsp->is_sparse = + (existing_dos_attributes & FILE_ATTRIBUTE_SPARSE); } /* |