2021-09-21 1:08 GMT+09:00, Tom Talpey <tom@xxxxxxxxxx>: > On 9/20/2021 12:47 AM, Steve French wrote: >> On Sat, Sep 18, 2021 at 9:06 PM Tom Talpey <tom@xxxxxxxxxx> wrote: >>> >>> This doesn't appear to be what's documented in MS-FSA section >>> 2.1.5.11.29. >>> There, it appears to call for returning an empty stream list, >>> and STATUS_SUCCESS, when no streams are present. >> >> I tried a quick test to Windows and it does appear to return $DATA >> stream by default: >> >> # ./smbinfo filestreaminfo /mnt/junk >> Name: ::$DATA >> Size: 179765 bytes >> Allocation size: 196608 bytes > > Ok, so the implication is that the default stream is indeed always > present, if the filesystem supports streams. The language in MS-FSA > would therefore be correct, but a bit vague. I agree that returning > a ::$DATA for ordinary files is appropriate. > >> when I tried the same thing to a directory on a share mounted to Windows >> 10 >> (NTFS), I get no streams returned. >> >> So it does look like default stream ($DATA) is only returned for files > > > My concern here is, what's so special about directories? A special file > or fifo, a symlink or reparse/junction, etc. Is it appropriate to cons > up a ::$DATA for these? What should the size values be, if so? Special files in linux(ksmbd share) is showing as regular file on windows client. > > Tom. > > >>> Also, why does the code special-case directories? The conditionals >>> on StreamSize and StreamAllocation size are entirely redundant, >>> after the top-level if (!S_ISDIR...), btw. >>> >>> I'd suggest asking Microsoft dochelp for clarification before >>> implementing this. >>> >>> Tom. >>> >>> On 9/18/2021 8:02 AM, Namjae Jeon wrote: >>>> Windows client expect to get default stream name(::DATA) in >>>> FILE_STREAM_INFORMATION response even if there is no stream data in >>>> file. >>>> This patch fix update failure when writing ppt or doc files. >> >> >> >> >