If doing an SMB_VFS_FSTAT() returning onto the stat struct stored in the fsp,
we must call vfs_stat_fsp() as this preserves the iflags.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15022
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit
d460118be3ad2a3100bb3458f6f0223df12f7c3f)
TALLOC_CTX *mem_ctx = talloc_tos();
char *existing_buf = NULL, *new_buf = NULL, *compact_buf = NULL;
int status;
+ NTSTATUS ntstatus;
DEBUG(10, ("vfs_vxfs: Getting existing ACL for %s\n", fsp_str_dbg(fsp)));
goto out;
}
- status = SMB_VFS_FSTAT(fsp, &fsp->fsp_name->st);
- if (status == -1) {
+ ntstatus = vfs_stat_fsp(fsp);
+ if (!NT_STATUS_IS_OK(ntstatus)) {
DEBUG(10, ("vfs_vxfs: stat failed!\n"));
+ errno = map_errno_from_nt_status(ntstatus);
goto out;
}