summaryrefslogtreecommitdiff
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
commit4f0509aeeb0e1a8ff6b962985e4468e94dab8273 (patch)
tree9bcc996ae45040429e2bb7a4d7c1dd8e95a5249a
parent627b1d0a61ad8825311c860a1e76aecd29fe8f67 (diff)
downloadsamba-4f0509aeeb0e1a8ff6b962985e4468e94dab8273.tar.gz
samba-4f0509aeeb0e1a8ff6b962985e4468e94dab8273.tar.bz2
samba-4f0509aeeb0e1a8ff6b962985e4468e94dab8273.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 (This used to be commit 7b39c4c59897669106d7129bad8af3d592d25838)
-rw-r--r--source3/locking/locking.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/locking/locking.c b/source3/locking/locking.c
index 1ed238f4d8..d2bfc08dd3 100644
--- a/source3/locking/locking.c
+++ b/source3/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 );
}
/*******************************************************************