Remove file system sharemode before calling unlink
authorChristof Schmitt <cs@samba.org>
Wed, 10 Jan 2018 22:56:08 +0000 (15:56 -0700)
committerChristof Schmitt <cs@samba.org>
Wed, 17 Jan 2018 00:31:53 +0000 (01:31 +0100)
commite77f8e4628ba868f09cbcf2970caac6c69fe080c
tree8dd2d2e02496d5b0d95455676bd0e7781717d410
parent8224a3d6a03aeb4648bb624f775b139115567a8f
Remove file system sharemode before calling unlink

GPFS implements the DENY_DELETE sharemode, which prevents unlink() from
deleting the file.. This causes the problem that deleting a file through
"delete on close" fails, as the code in close.c first calls unlink() and
only later removes the file system sharemode.

Fix this by removing the file system sharemode before calling unlink().

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

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Christof Schmitt <cs@samba.org>
Autobuild-Date(master): Wed Jan 17 01:31:53 CET 2018 on sn-devel-144
source3/smbd/close.c