summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-09-05 21:39:43 +0000
committerAndrew Tridgell <tridge@samba.org>2001-09-05 21:39:43 +0000
commit7b39c4c59897669106d7129bad8af3d592d25838 (patch)
tree7bdd156ad4de740cb4590ed9322b971add864d5d
parent2020738b889d8d508cf787e5c5d380af817b92f9 (diff)
downloadsamba-7b39c4c59897669106d7129bad8af3d592d25838.tar.gz
samba-7b39c4c59897669106d7129bad8af3d592d25838.tar.xz
samba-7b39c4c59897669106d7129bad8af3d592d25838.zip
2nd DELETE_ON_CLOSE_FLAG fix ...
we set the DELETE_ON_CLOSE_FLAG on all share modes on the file, which means the share mode in the fsp will not match the one in the tdb when we come to close for other file handles, which means we end up with share modes on files after all handles are closed fixed by making the comparison function that says if two shares modes are equal ignore the DELETE_ON_CLOSE_FLAG
-rw-r--r--source/locking/locking.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/locking/locking.c b/source/locking/locking.c
index 1ed238f4d8c..d2bfc08dd31 100644
--- a/source/locking/locking.c
+++ b/source/locking/locking.c
@@ -470,9 +470,9 @@ static void fill_share_mode(char *p, files_struct *fsp, uint16 port, uint16 op_t
BOOL share_modes_identical( share_mode_entry *e1, share_mode_entry *e2)
{
return (e1->pid == e2->pid &&
- e1->share_mode == e2->share_mode &&
- e1->time.tv_sec == e2->time.tv_sec &&
- e1->time.tv_usec == e2->time.tv_usec );
+ (e1->share_mode & ~DELETE_ON_CLOSE_FLAG) == (e2->share_mode & ~DELETE_ON_CLOSE_FLAG) &&
+ e1->time.tv_sec == e2->time.tv_sec &&
+ e1->time.tv_usec == e2->time.tv_usec );
}
/*******************************************************************