smbd: add and use vfs_fget_dos_attributes()
authorRalph Boehme <slow@samba.org>
Thu, 11 Aug 2022 15:18:13 +0000 (17:18 +0200)
committerStefan Metzmacher <metze@samba.org>
Mon, 22 Aug 2022 08:02:35 +0000 (08:02 +0000)
commit3f7d8db9945a325020e4d1574289dea9e8331c29
tree80020fd87fe90105733bffa85aad849c45693f68
parente74b10e17ee5df0f77ac5349242841be8d71c4e8
smbd: add and use vfs_fget_dos_attributes()

Commit d71ef1365cdde47aeb3465699181656b0655fa04 caused a regression where the
creation date on streams wasn't updated anymore on the stream fsp.

By adding a simple wrapper vfs_fget_dos_attributes() that takes care of

- passing only the base_fsp to the VFS, so the VFS can be completely agnostic of
  all the streams related complexity like fake fds,

- propagating any updated btime from the base_fsp->fsp_name to the
  stream_fsp->fsp_name

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>
selftest/knownfail.d/smb2.streams [deleted file]
source3/include/proto.h
source3/smbd/dosmode.c
source3/smbd/open.c
source3/smbd/vfs.c