SMBServer: Bugfix: Incorrect OplockLevel was reported

This commit is contained in:
Tal Aloni 2017-07-28 10:47:10 +03:00
parent 383c11dc00
commit 6b329e07c4
2 changed files with 0 additions and 12 deletions

View file

@ -76,19 +76,11 @@ namespace SMBLibrary.Server.SMB1
if (isExtended)
{
NTCreateAndXResponseExtended response = CreateResponseExtendedFromFileInformation(fileInfo, fileID.Value, fileStatus);
if ((request.Flags & NTCreateFlags.NT_CREATE_REQUEST_OPBATCH) > 0)
{
response.OpLockLevel = OpLockLevel.BatchOpLockGranted;
}
return response;
}
else
{
NTCreateAndXResponse response = CreateResponseFromFileInformation(fileInfo, fileID.Value, fileStatus);
if ((request.Flags & NTCreateFlags.NT_CREATE_REQUEST_OPBATCH) > 0)
{
response.OpLockLevel = OpLockLevel.BatchOpLockGranted;
}
return response;
}
}

View file

@ -60,10 +60,6 @@ namespace SMBLibrary.Server.SMB2
{
FileNetworkOpenInformation fileInfo = NTFileStoreHelper.GetNetworkOpenInformation(share.FileStore, handle);
CreateResponse response = CreateResponseFromFileSystemEntry(fileInfo, fileID.Value, fileStatus);
if (request.RequestedOplockLevel == OplockLevel.Batch)
{
response.OplockLevel = OplockLevel.Batch;
}
return response;
}
}