mirror of
https://github.com/samba-team/samba.git
synced 2025-03-12 20:58:37 +03:00
smbd: directly pass fsp to SMB_VFS_FGETXATTR() in fget_ea_dos_attribute()
We're now consistently passing the base_fsp to SMB_VFS_FSET_DOS_ATTRIBUTES(), so we don't need to check for a stream_fsp here anymore. Additionally vfs_default will assert a non-stream fsp inside vfswrap_fgetxattr(), so in case any caller wrongly passes a stream fsp, this is caught in vfs_default. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15126 MR: https://gitlab.com/samba-team/samba/-/merge_requests/2643 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 968a5ae89f0d0da219e7dd05dd1f7f7c96dbb910)
This commit is contained in:
parent
135b59d00a
commit
ab0f75acbb
@ -375,7 +375,7 @@ NTSTATUS fget_ea_dos_attribute(struct files_struct *fsp,
|
||||
/* Don't reset pattr to zero as we may already have filename-based attributes we
|
||||
need to preserve. */
|
||||
|
||||
sizeret = SMB_VFS_FGETXATTR(fsp->base_fsp ? fsp->base_fsp : fsp,
|
||||
sizeret = SMB_VFS_FGETXATTR(fsp,
|
||||
SAMBA_XATTR_DOS_ATTRIB,
|
||||
attrstr,
|
||||
sizeof(attrstr));
|
||||
@ -386,7 +386,7 @@ NTSTATUS fget_ea_dos_attribute(struct files_struct *fsp,
|
||||
rights than the real user
|
||||
*/
|
||||
become_root();
|
||||
sizeret = SMB_VFS_FGETXATTR(fsp->base_fsp ? fsp->base_fsp : fsp,
|
||||
sizeret = SMB_VFS_FGETXATTR(fsp,
|
||||
SAMBA_XATTR_DOS_ATTRIB,
|
||||
attrstr,
|
||||
sizeof(attrstr));
|
||||
|
Loading…
x
Reference in New Issue
Block a user