summaryrefslogtreecommitdiff
path: root/source4/ntvfs
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2008-04-19 09:59:07 +0200
committerAndrew Bartlett <abartlet@samba.org>2008-04-19 09:59:07 +0200
commit61fba825940b03ac954208cc0ead4ed2c0af848a (patch)
treea1bd49b2ec3ef31f39307439cdd1c4711644c44c /source4/ntvfs
parent0321bc02598087685c6ea144e3920a64ab909b83 (diff)
parentf0eb488d221d2d12d750babac0252aac671d92f4 (diff)
downloadsamba-61fba825940b03ac954208cc0ead4ed2c0af848a.tar.gz
samba-61fba825940b03ac954208cc0ead4ed2c0af848a.tar.bz2
samba-61fba825940b03ac954208cc0ead4ed2c0af848a.zip
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into 4-0-abartlet
(This used to be commit 13a0941d3432dc7dae552048265ad1e762b781d4)
Diffstat (limited to 'source4/ntvfs')
-rw-r--r--source4/ntvfs/ntvfs_generic.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/source4/ntvfs/ntvfs_generic.c b/source4/ntvfs/ntvfs_generic.c
index 5d4bbf388c..3653ad82c1 100644
--- a/source4/ntvfs/ntvfs_generic.c
+++ b/source4/ntvfs/ntvfs_generic.c
@@ -209,13 +209,13 @@ static NTSTATUS ntvfs_map_open_finish(struct ntvfs_module_context *ntvfs,
case RAW_OPEN_SMB2:
io->smb2.out.file.ntvfs = io2->generic.out.file.ntvfs;
switch (io2->generic.out.oplock_level) {
- case OPLOCK_BATCH:
+ case BATCH_OPLOCK_RETURN:
io->smb2.out.oplock_level = SMB2_OPLOCK_LEVEL_BATCH;
break;
- case OPLOCK_EXCLUSIVE:
+ case EXCLUSIVE_OPLOCK_RETURN:
io->smb2.out.oplock_level = SMB2_OPLOCK_LEVEL_EXCLUSIVE;
break;
- case OPLOCK_LEVEL_II:
+ case LEVEL_II_OPLOCK_RETURN:
io->smb2.out.oplock_level = SMB2_OPLOCK_LEVEL_II;
break;
default:
@@ -1043,6 +1043,23 @@ NTSTATUS ntvfs_map_lock(struct ntvfs_module_context *ntvfs,
/* initialize output value */
lck->smb2.out.unknown1 = 0;
break;
+
+ case RAW_LOCK_SMB2_BREAK:
+ lck2->generic.level = RAW_LOCK_GENERIC;
+ lck2->generic.in.file.ntvfs = lck->smb2_break.in.file.ntvfs;
+ lck2->generic.in.mode = LOCKING_ANDX_OPLOCK_RELEASE |
+ ((lck->smb2_break.in.oplock_level << 8) & 0xFF00);
+ lck2->generic.in.timeout = 0;
+ lck2->generic.in.ulock_cnt = 0;
+ lck2->generic.in.lock_cnt = 0;
+ lck2->generic.in.locks = NULL;
+
+ /* initialize output value */
+ lck->smb2_break.out.oplock_level= lck->smb2_break.in.oplock_level;
+ lck->smb2_break.out.reserved = lck->smb2_break.in.reserved;
+ lck->smb2_break.out.reserved2 = lck->smb2_break.in.reserved2;
+ lck->smb2_break.out.file = lck->smb2_break.in.file;
+ break;
}
/*