diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c index 50b6fac8b95..19101efba74 100644 --- a/source3/modules/vfs_fruit.c +++ b/source3/modules/vfs_fruit.c @@ -5204,6 +5204,7 @@ static int fruit_fstat_meta_stream(vfs_handle_struct *handle, SMB_STRUCT_STAT *sbuf) { struct fio *fio = (struct fio *)VFS_FETCH_FSP_EXTENSION(handle, fsp); + struct smb_filename smb_fname; ino_t ino; int ret; @@ -5223,11 +5224,15 @@ static int fruit_fstat_meta_stream(vfs_handle_struct *handle, return 0; } - ret = fruit_stat_base(handle, fsp->base_fsp->fsp_name, false); + smb_fname = (struct smb_filename) { + .base_name = fsp->fsp_name->base_name, + }; + + ret = fruit_stat_base(handle, &smb_fname, false); if (ret != 0) { return -1; } - *sbuf = fsp->base_fsp->fsp_name->st; + *sbuf = smb_fname.st; ino = fruit_inode(sbuf, fsp->fsp_name->stream_name);