s3: smbd - Prevent file truncation on an open that fails with share mode violation.
authorJeremy Allison <jra@samba.org>
Tue, 24 Jun 2014 21:19:30 +0000 (14:19 -0700)
committerDavid Disseldorp <ddiss@samba.org>
Wed, 25 Jun 2014 09:22:12 +0000 (11:22 +0200)
commit31b3427a417217e5e869baafdf63e633efc39d12
tree1cc81fcb418a2de5c24b4d5358ceca8264e0c3f2
parent457d79f2cb83f3f5c3f8d64ed99f9b1ea0185d3f
s3: smbd - Prevent file truncation on an open that fails with share mode violation.

Fix from Volker, really - just tidied up a little.
The S_ISFIFO check may not be strictly neccessary,
but doesn't hurt (might make the code a bit more complex
than it needs to be).

Fixes bug #10671 - Samba file corruption as a result of failed lock check.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
source3/smbd/open.c