After openat_pathref_fsp() is successful we know we have a VALID_STAT().
It either returns NT_STATUS_OK or we look at the stat
struct for S_ISLNK so we know we have VALID_STAT().
If it's not successful we error out, so we don't need
another vfs_stat() here.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Dec 16 07:33:09 UTC 2021 on sn-devel-184
uint32_t *out_file_attributes)
{
NTSTATUS status;
- int ret;
status = openat_pathref_fsp(conn->cwd_fsp, smb_fname);
if (NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_NOT_FOUND) &&
return;
}
- ret = vfs_stat(conn, smb_fname);
- if (ret != 0) {
- return;
- }
-
*out_flags = SMB2_CLOSE_FLAGS_FULL_INFORMATION;
*out_file_attributes = fdos_mode(smb_fname->fsp);
*out_last_write_ts = smb_fname->st.st_ex_mtime;