Symlinks to files can have random DOS mode information in a directory listing

bin/smbclient -U 'slow%x' //localhost/share -c "ls 1/2/3/*"
  .                                   D        0  Wed May 24 13:03:33 2023
  ..                                  D        0  Tue May 23 10:41:25 2023
  link1                           VRdtr        5  Tue May 23 10:49:26 2023

This happens because in vfswrap_readdir() we don't zero initialize the SMB_STRUCT_STAT variable.

https://bugzilla.samba.org/show_bug.cgi?id=15375

Edited by Ralph Böhme

Merge request reports