summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-09-05 21:13:58 +0000
committerAndrew Tridgell <tridge@samba.org>2001-09-05 21:13:58 +0000
commit627b1d0a61ad8825311c860a1e76aecd29fe8f67 (patch)
treee1f57ea7b852c2d00904123ff3d88bbae29d358e /source3/smbd
parent387f1fd09ca8101f161c729394340f50e882a955 (diff)
downloadsamba-627b1d0a61ad8825311c860a1e76aecd29fe8f67.tar.gz
samba-627b1d0a61ad8825311c860a1e76aecd29fe8f67.tar.bz2
samba-627b1d0a61ad8825311c860a1e76aecd29fe8f67.zip
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)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/trans2.c7
1 files changed, 7 insertions, 0 deletions
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.
*/