mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-07-26 02:38:15 +02:00
SMBServer: Bugfix: Incorrect OplockLevel was reported
This commit is contained in:
parent
383c11dc00
commit
6b329e07c4
2 changed files with 0 additions and 12 deletions
|
@ -76,19 +76,11 @@ namespace SMBLibrary.Server.SMB1
|
||||||
if (isExtended)
|
if (isExtended)
|
||||||
{
|
{
|
||||||
NTCreateAndXResponseExtended response = CreateResponseExtendedFromFileInformation(fileInfo, fileID.Value, fileStatus);
|
NTCreateAndXResponseExtended response = CreateResponseExtendedFromFileInformation(fileInfo, fileID.Value, fileStatus);
|
||||||
if ((request.Flags & NTCreateFlags.NT_CREATE_REQUEST_OPBATCH) > 0)
|
|
||||||
{
|
|
||||||
response.OpLockLevel = OpLockLevel.BatchOpLockGranted;
|
|
||||||
}
|
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
NTCreateAndXResponse response = CreateResponseFromFileInformation(fileInfo, fileID.Value, fileStatus);
|
NTCreateAndXResponse response = CreateResponseFromFileInformation(fileInfo, fileID.Value, fileStatus);
|
||||||
if ((request.Flags & NTCreateFlags.NT_CREATE_REQUEST_OPBATCH) > 0)
|
|
||||||
{
|
|
||||||
response.OpLockLevel = OpLockLevel.BatchOpLockGranted;
|
|
||||||
}
|
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,10 +60,6 @@ namespace SMBLibrary.Server.SMB2
|
||||||
{
|
{
|
||||||
FileNetworkOpenInformation fileInfo = NTFileStoreHelper.GetNetworkOpenInformation(share.FileStore, handle);
|
FileNetworkOpenInformation fileInfo = NTFileStoreHelper.GetNetworkOpenInformation(share.FileStore, handle);
|
||||||
CreateResponse response = CreateResponseFromFileSystemEntry(fileInfo, fileID.Value, fileStatus);
|
CreateResponse response = CreateResponseFromFileSystemEntry(fileInfo, fileID.Value, fileStatus);
|
||||||
if (request.RequestedOplockLevel == OplockLevel.Batch)
|
|
||||||
{
|
|
||||||
response.OplockLevel = OplockLevel.Batch;
|
|
||||||
}
|
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue