[PATCH] Fix POSIX unlink on a file containing streams.

Ralph Böhme slow at samba.org
Tue Jul 19 19:41:59 UTC 2016


On Tue, Jul 19, 2016 at 10:36:01AM -0700, Jeremy Allison wrote:
> Bug https://bugzilla.samba.org/show_bug.cgi?id=12021
> is really interesting. It causes the server to recurse
> (and clients to timeout and drop connections) when
> a client issues a POSIX unlink on an existing file
> containing Windows streams.

nasty, nasty, nasty. So SMB1 with UNIX extensions, heck, who's still
using that? :)

> Essentially when deleting we check for streams
> within a file, and do 2 operations - on open for
> delete we check that no other process has a stream
> open incompatibly, and on close we need to enumerate
> the streams by name and delete them. When done on
> a POSIX pathname we need to treat the internal
> stream names as Windows pathnames or we recurse
> (and badness happens :-).
> 
> Fix is below and includes regression test.

lgtm&pushed!

Cheerio!
-slow



More information about the samba-technical mailing list