smbd: move fstat from create_internal_dirfsp() to open_internal_dirfsp()
authorRalph Boehme <slow@samba.org>
Fri, 15 May 2020 13:25:07 +0000 (15:25 +0200)
committerRalph Boehme <slow@samba.org>
Thu, 21 May 2020 05:23:30 +0000 (05:23 +0000)
commit9557489478900c074d51bcb99f8b4be9920a0bf7
tree3e3624c7497a7beb42eb85138d9c34ccafe6df14
parent8883dacb1252c8dba554f666b3e38ebf039d68a5
smbd: move fstat from create_internal_dirfsp() to open_internal_dirfsp()

The original idea of doing the fstat in create_internal_dirfsp() was to return
from the function with a valid file_id and that requires valid stat info.

However, as dirfsp->fh->fd will still be -1 at this point vfs_stat_fsp() will
fallback to path-based stat() which must be avoided.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/files.c