summaryrefslogtreecommitdiff
path: root/source3/locking/locking.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-03-23 02:57:44 +0000
committerJeremy Allison <jra@samba.org>2002-03-23 02:57:44 +0000
commitc90cd26e9430b2fc065f620bdb6aaf4be0372fcc (patch)
tree24d94d8df7d083923998f92d07202fa5cae66c3b /source3/locking/locking.c
parentce236d1dbf2673e2ff921683554cee41fca33249 (diff)
downloadsamba-c90cd26e9430b2fc065f620bdb6aaf4be0372fcc.tar.gz
samba-c90cd26e9430b2fc065f620bdb6aaf4be0372fcc.tar.bz2
samba-c90cd26e9430b2fc065f620bdb6aaf4be0372fcc.zip
Fix the mp3 rename bug - also tidy up our open code and remove the special
cases for rename and unlink. Had to add desired_access into the share mode record. Jeremy. (This used to be commit 3b1b8ac43535fb0839c5474fa55bf7150f6cde31)
Diffstat (limited to 'source3/locking/locking.c')
-rw-r--r--source3/locking/locking.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/locking/locking.c b/source3/locking/locking.c
index 6efe4a73d7..87df805250 100644
--- a/source3/locking/locking.c
+++ b/source3/locking/locking.c
@@ -361,8 +361,8 @@ static char *share_mode_str(int num, share_mode_entry *e)
static pstring share_str;
slprintf(share_str, sizeof(share_str)-1, "share_mode_entry[%d]: \
-pid = %u, share_mode = 0x%x, port = 0x%x, type= 0x%x, file_id = %lu, dev = 0x%x, inode = %.0f",
- num, e->pid, e->share_mode, e->op_port, e->op_type, e->share_file_id,
+pid = %u, share_mode = 0x%x, desired_access = 0x%x, port = 0x%x, type= 0x%x, file_id = %lu, dev = 0x%x, inode = %.0f",
+ num, e->pid, e->share_mode, (unsigned int)e->desired_access, e->op_port, e->op_type, e->share_file_id,
(unsigned int)e->dev, (double)e->inode );
return share_str;
@@ -471,6 +471,7 @@ static void fill_share_mode(char *p, files_struct *fsp, uint16 port, uint16 op_t
memset(e, '\0', sizeof(share_mode_entry));
e->pid = sys_getpid();
e->share_mode = fsp->share_mode;
+ e->desired_access = fsp->desired_access;
e->op_port = port;
e->op_type = op_type;
memcpy(x, &fsp->open_time, sizeof(struct timeval));
@@ -481,7 +482,7 @@ static void fill_share_mode(char *p, files_struct *fsp, uint16 port, uint16 op_t
/*******************************************************************
Check if two share mode entries are identical, ignoring oplock
- and port info.
+ and port info and desired_access.
********************************************************************/
BOOL share_modes_identical( share_mode_entry *e1, share_mode_entry *e2)