diff options
author | Jeremy Allison <jra@samba.org> | 2011-03-18 14:57:05 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2011-03-18 23:39:49 +0100 |
commit | 89b6af0982fc935c6b9b0f5aa2beea696b332709 (patch) | |
tree | 632680577d90ac86144716d7c7c172ee3ec25e5a | |
parent | 4b347a1b17549a3807d9448866fa37dcb293c4e7 (diff) | |
download | samba-89b6af0982fc935c6b9b0f5aa2beea696b332709.tar.gz samba-89b6af0982fc935c6b9b0f5aa2beea696b332709.tar.bz2 samba-89b6af0982fc935c6b9b0f5aa2beea696b332709.zip |
SMB2 renames return SHARING_VIOLATION if there is any existing oplock on a file.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Mar 18 23:39:49 CET 2011 on sn-devel-104
-rw-r--r-- | source3/smbd/smb2_setinfo.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/smbd/smb2_setinfo.c b/source3/smbd/smb2_setinfo.c index 9afb487dce..26d94e2b10 100644 --- a/source3/smbd/smb2_setinfo.c +++ b/source3/smbd/smb2_setinfo.c @@ -216,6 +216,12 @@ static struct tevent_req *smbd_smb2_setinfo_send(TALLOC_CTX *mem_ctx, if (file_info_level == SMB_FILE_RENAME_INFORMATION) { /* SMB2_FILE_RENAME_INFORMATION_INTERNAL == 0xFF00 + in_file_info_class */ file_info_level = SMB2_FILE_RENAME_INFORMATION_INTERNAL; + if (fsp->oplock_type != FAKE_LEVEL_II_OPLOCK && + fsp->oplock_type != NO_OPLOCK) { + /* No break, but error. */ + tevent_req_nterror(req, NT_STATUS_SHARING_VIOLATION); + return tevent_req_post(req, ev); + } } if (fsp->fh->fd == -1) { |