Browse Source

SMBServer: Bugfix: Incorrect OplockLevel was reported

Tal Aloni 7 years ago
parent
commit
6b329e07c4
2 changed files with 0 additions and 12 deletions
  1. 0 8
      SMBLibrary/Server/SMB1/NTCreateHelper.cs
  2. 0 4
      SMBLibrary/Server/SMB2/CreateHelper.cs

+ 0 - 8
SMBLibrary/Server/SMB1/NTCreateHelper.cs

@@ -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;
                 }
             }

+ 0 - 4
SMBLibrary/Server/SMB2/CreateHelper.cs

@@ -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;
             }
         }