summaryrefslogtreecommitdiffstats
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
commit2020738b889d8d508cf787e5c5d380af817b92f9 (patch)
treee377b55b107079734d7c68ad6abc7352bff8e694
parent9955ea0aaa299c6c946b4e7b7e98017c39b60bc8 (diff)
downloadsamba-2020738b889d8d508cf787e5c5d380af817b92f9.tar.gz
samba-2020738b889d8d508cf787e5c5d380af817b92f9.tar.xz
samba-2020738b889d8d508cf787e5c5d380af817b92f9.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!
-rw-r--r--source/smbd/trans2.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c
index cb4ca994f4e..b21cdfdab04 100644
--- a/source/smbd/trans2.c
+++ b/source/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.
*/