vfs_fruit: filter empty streams
authorRalph Boehme <slow@samba.org>
Sat, 20 Oct 2018 12:53:50 +0000 (14:53 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 31 Oct 2018 20:27:20 +0000 (21:27 +0100)
commitebfcf75e993b1a792db76b94aa898532e1c81eeb
treec9a5cf6f81e53e5baa921d758029c4f174596d29
parent046456fca60b9fef38a0cdf5a116883fb1c7dffe
vfs_fruit: filter empty streams

First step in achieving macOS compliant behaviour wrt to empty streams:
- hide empty streams in streaminfo
- prevent opens of empty streams

This means that we may carry 0-byte sized streams in our streams
backend, but this shouldn't really hurt.

The previous attempt of deleting the streams when an SMB setinfo eof to
0 request came in, turned out be a road into desaster.

We could set delete-on-close on the stream, but that means we'd have to
check for it for every write on a stream and checking the
delete-on-close bits requires fetching the locking.tdb record, so this
is expensive and I'd like to avoid that overhead.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
selftest/knownfail.d/samba3.vfs.fruit
source3/modules/vfs_fruit.c