From 4f0509aeeb0e1a8ff6b962985e4468e94dab8273 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 5 Sep 2001 21:39:43 +0000 Subject: 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) --- source3/locking/locking.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source3/locking') 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 ); } /******************************************************************* -- cgit