From: Andrew Tridgell Date: Fri, 27 Nov 2009 08:09:10 +0000 (+1100) Subject: s4-ntvfs: win7 does not check for the NONE smb2 lock flag on unlock X-Git-Tag: samba-4.0.0alpha9~121 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b3115f5cdc558ed71e11141e4f515511f3c6df5a;p=thirdparty%2Fsamba.git s4-ntvfs: win7 does not check for the NONE smb2 lock flag on unlock --- diff --git a/source4/ntvfs/ntvfs_generic.c b/source4/ntvfs/ntvfs_generic.c index 3319539b63d..059145b6e5a 100644 --- a/source4/ntvfs/ntvfs_generic.c +++ b/source4/ntvfs/ntvfs_generic.c @@ -1116,7 +1116,8 @@ NTSTATUS ntvfs_map_lock(struct ntvfs_module_context *ntvfs, isunlock = false; } for (i=0;ismb2.in.lock_count;i++) { - if (lck->smb2.in.locks[i].flags == SMB2_LOCK_FLAG_NONE) { + if (!isunlock && + lck->smb2.in.locks[i].flags == SMB2_LOCK_FLAG_NONE) { return NT_STATUS_INVALID_PARAMETER; }