Streams support in Linux

Steve French smfrench at gmail.com
Tue Aug 28 20:43:45 UTC 2018


On Tue, Aug 28, 2018 at 2:47 PM Jeremy Allison <jra at samba.org> wrote:
>
> On Tue, Aug 28, 2018 at 02:43:12PM -0500, Steve French wrote:
> > > > On Tue, Aug 28, 2018 at 1:12 PM Jeremy Allison <jra at samba.org> wrote:
> > >
> > > You shouldn't need a read stream ioctl. You only need 3 I think.
<snip>
> > > 3). ioctl(stream_fd, FIO_DELETE_STREAM, 0);
> > >
> > > Delete the stream opened on stream_fd.
> > >
> > > Doesn't that cover everything ?
> >
> > This would be trickier to code than you might think.
> >
> > In particular I think the reaadir to list streams is going to be
> > harder than the ioctl
> > I had coded for it.   I also had code at one point to convert streams
> > to xattrs etc.
>
> Why is that ? You control any fd's you return,
> so you can vector any readdir call into an
> enum_streams request ?
>
> I wouldn't return streams as xattrs, as they
> are separately exposed and already have meaning
> in SMB1/2/3.

In theory I could construct a struct fd by setting up a struct file on the fly
(see "alloc_empty_file" for example) and the few dozen fields in it,
but it would be a lot easier to return them as xattrs with a reserved
prefix (e.g. "streams")
since most of these are small (some examples) and could have been
stored in xattrs
if the Apple or Windows developers had wanted to

"streams.ZoneIdentifier" (for Internet Explorer download security info)
"streams.favicon"  (for Internet explorer icons)
"streams.AFP_AfpInfo" and "streams.AFP_Resource" (for two common Mac streams)
"streams.XPRESS" (for compression)

-- 
Thanks,

Steve



More information about the samba-technical mailing list