From 985a26118a3d5411e62c34aa0d62efa68465b352 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sun, 11 Feb 2007 04:37:56 +0000 Subject: r21274: As we now have POSIX opens which can unlink with other open files we may have taken the delete code path with more than one share mode entry - ensure we only delete once by resetting the delete on close flag. Jeremy. (This used to be commit 429dff31663e71556b5193b25d5b8e7e09fa5b9c) --- source3/smbd/close.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source3/smbd/close.c') diff --git a/source3/smbd/close.c b/source3/smbd/close.c index 05a45cc14f..eea8fa01d5 100644 --- a/source3/smbd/close.c +++ b/source3/smbd/close.c @@ -287,6 +287,15 @@ static NTSTATUS close_remove_share_mode(files_struct *fsp, status = map_nt_error_from_unix(errno); } + /* As we now have POSIX opens which can unlink + * with other open files we may have taken + * this code path with more than one share mode + * entry - ensure we only delete once by resetting + * the delete on close flag. JRA. + */ + + set_delete_on_close_lck(lck, False, NULL); + done: /* unbecome user. */ -- cgit