From 627b1d0a61ad8825311c860a1e76aecd29fe8f67 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 5 Sep 2001 21:13:58 +0000 Subject: when you update the share mode in the db you must also update fsp->share_mode otherwise the check to see if the fsp share mode matches the one in the db will fail when you come to delete it, thus leaving us with a share mode on a file that isn't even open! (This used to be commit 2020738b889d8d508cf787e5c5d380af817b92f9) --- source3/smbd/trans2.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source3/smbd') diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index cb4ca994f4..b21cdfdab0 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -2001,6 +2001,13 @@ static int call_trans2setfilepathinfo(connection_struct *conn, return ERROR_DOS(ERRDOS,ERRnoaccess); } + /* we have to also set the delete flag in our fsp */ + if (delete_on_close) { + fsp->share_mode |= DELETE_ON_CLOSE_FLAG; + } else { + fsp->share_mode &= ~DELETE_ON_CLOSE_FLAG; + } + /* * Release the lock. */ -- cgit