summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2011-05-16 10:41:51 -0700
committerJeremy Allison <jra@samba.org>2011-05-16 10:41:51 -0700
commitfe21bdc43c0aeacfc8592998e6a90f6f83c939e0 (patch)
tree1102f0e791d20960c628b04cde7f1399f3d6ac1d /source3
parenta032c9c8fe8aff455407485169b9445860f89606 (diff)
downloadsamba-fe21bdc43c0aeacfc8592998e6a90f6f83c939e0.tar.gz
samba-fe21bdc43c0aeacfc8592998e6a90f6f83c939e0.tar.bz2
samba-fe21bdc43c0aeacfc8592998e6a90f6f83c939e0.zip
Ensure we always write the correct incoming mid into the share mode
table entries.
Diffstat (limited to 'source3')
-rw-r--r--source3/modules/onefs_open.c6
-rw-r--r--source3/smbd/open.c6
2 files changed, 8 insertions, 4 deletions
diff --git a/source3/modules/onefs_open.c b/source3/modules/onefs_open.c
index 6ab47d739b..101dc5bc6e 100644
--- a/source3/modules/onefs_open.c
+++ b/source3/modules/onefs_open.c
@@ -1310,7 +1310,8 @@ NTSTATUS onefs_open_file_ntcreate(connection_struct *conn,
new_file_created = True;
}
- set_share_mode(lck, fsp, get_current_uid(conn), 0,
+ set_share_mode(lck, fsp, get_current_uid(conn),
+ req ? req->mid : 0,
fsp->oplock_type);
/* Handle strange delete on close create semantics. */
@@ -1666,7 +1667,8 @@ static NTSTATUS onefs_open_directory(connection_struct *conn,
return NT_STATUS_DELETE_PENDING;
}
- set_share_mode(lck, fsp, get_current_uid(conn), 0, NO_OPLOCK);
+ set_share_mode(lck, fsp, get_current_uid(conn),
+ req ? req->mid : 0, NO_OPLOCK);
/*
* For directories the delete on close bit at open time seems
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 076ae1ff69..5d9621748f 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -2335,7 +2335,8 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn,
new_file_created = True;
}
- set_share_mode(lck, fsp, get_current_uid(conn), 0,
+ set_share_mode(lck, fsp, get_current_uid(conn),
+ req ? req->mid : 0,
fsp->oplock_type);
/* Handle strange delete on close create semantics. */
@@ -2828,7 +2829,8 @@ static NTSTATUS open_directory(connection_struct *conn,
return status;
}
- set_share_mode(lck, fsp, get_current_uid(conn), 0, NO_OPLOCK);
+ set_share_mode(lck, fsp, get_current_uid(conn),
+ req ? req->mid : 0, NO_OPLOCK);
/* For directories the delete on close bit at open time seems
always to be honored on close... See test 19 in Samba4 BASE-DELETE. */