mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-07-14 05:15:03 +02:00
Server: SMB1: Pass the Transaction2 MaxDataCount parameter to methods that retrieve FileInformation / FileSystemInformation
This commit is contained in:
parent
01eb1ecc9e
commit
68cc57e9a8
2 changed files with 7 additions and 7 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 2014-2017 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
|
/* Copyright (C) 2014-2019 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
|
||||||
*
|
*
|
||||||
* You can redistribute this program and/or modify it under the terms of
|
* You can redistribute this program and/or modify it under the terms of
|
||||||
* the GNU Lesser Public License as published by the Free Software Foundation,
|
* the GNU Lesser Public License as published by the Free Software Foundation,
|
||||||
|
@ -131,7 +131,7 @@ namespace SMBLibrary.Server.SMB1
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static Transaction2QueryFSInformationResponse GetSubcommandResponse(SMB1Header header, Transaction2QueryFSInformationRequest subcommand, ISMBShare share, SMB1ConnectionState state)
|
internal static Transaction2QueryFSInformationResponse GetSubcommandResponse(SMB1Header header, uint maxDataCount, Transaction2QueryFSInformationRequest subcommand, ISMBShare share, SMB1ConnectionState state)
|
||||||
{
|
{
|
||||||
SMB1Session session = state.GetSession(header.UID);
|
SMB1Session session = state.GetSession(header.UID);
|
||||||
if (share is FileSystemShare)
|
if (share is FileSystemShare)
|
||||||
|
@ -224,7 +224,7 @@ namespace SMBLibrary.Server.SMB1
|
||||||
return new Transaction2SetFSInformationResponse();
|
return new Transaction2SetFSInformationResponse();
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static Transaction2QueryPathInformationResponse GetSubcommandResponse(SMB1Header header, Transaction2QueryPathInformationRequest subcommand, ISMBShare share, SMB1ConnectionState state)
|
internal static Transaction2QueryPathInformationResponse GetSubcommandResponse(SMB1Header header, uint maxDataCount, Transaction2QueryPathInformationRequest subcommand, ISMBShare share, SMB1ConnectionState state)
|
||||||
{
|
{
|
||||||
SMB1Session session = state.GetSession(header.UID);
|
SMB1Session session = state.GetSession(header.UID);
|
||||||
string path = subcommand.FileName;
|
string path = subcommand.FileName;
|
||||||
|
@ -278,7 +278,7 @@ namespace SMBLibrary.Server.SMB1
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static Transaction2QueryFileInformationResponse GetSubcommandResponse(SMB1Header header, Transaction2QueryFileInformationRequest subcommand, ISMBShare share, SMB1ConnectionState state)
|
internal static Transaction2QueryFileInformationResponse GetSubcommandResponse(SMB1Header header, uint maxDataCount, Transaction2QueryFileInformationRequest subcommand, ISMBShare share, SMB1ConnectionState state)
|
||||||
{
|
{
|
||||||
SMB1Session session = state.GetSession(header.UID);
|
SMB1Session session = state.GetSession(header.UID);
|
||||||
OpenFileObject openFile = session.GetOpenFileObject(subcommand.FID);
|
OpenFileObject openFile = session.GetOpenFileObject(subcommand.FID);
|
||||||
|
|
|
@ -206,7 +206,7 @@ namespace SMBLibrary.Server.SMB1
|
||||||
}
|
}
|
||||||
else if (subcommand is Transaction2QueryFSInformationRequest)
|
else if (subcommand is Transaction2QueryFSInformationRequest)
|
||||||
{
|
{
|
||||||
subcommandResponse = Transaction2SubcommandHelper.GetSubcommandResponse(header, (Transaction2QueryFSInformationRequest)subcommand, share, state);
|
subcommandResponse = Transaction2SubcommandHelper.GetSubcommandResponse(header, maxDataCount, (Transaction2QueryFSInformationRequest)subcommand, share, state);
|
||||||
}
|
}
|
||||||
else if (subcommand is Transaction2SetFSInformationRequest)
|
else if (subcommand is Transaction2SetFSInformationRequest)
|
||||||
{
|
{
|
||||||
|
@ -214,7 +214,7 @@ namespace SMBLibrary.Server.SMB1
|
||||||
}
|
}
|
||||||
else if (subcommand is Transaction2QueryPathInformationRequest)
|
else if (subcommand is Transaction2QueryPathInformationRequest)
|
||||||
{
|
{
|
||||||
subcommandResponse = Transaction2SubcommandHelper.GetSubcommandResponse(header, (Transaction2QueryPathInformationRequest)subcommand, share, state);
|
subcommandResponse = Transaction2SubcommandHelper.GetSubcommandResponse(header, maxDataCount, (Transaction2QueryPathInformationRequest)subcommand, share, state);
|
||||||
}
|
}
|
||||||
else if (subcommand is Transaction2SetPathInformationRequest)
|
else if (subcommand is Transaction2SetPathInformationRequest)
|
||||||
{
|
{
|
||||||
|
@ -222,7 +222,7 @@ namespace SMBLibrary.Server.SMB1
|
||||||
}
|
}
|
||||||
else if (subcommand is Transaction2QueryFileInformationRequest)
|
else if (subcommand is Transaction2QueryFileInformationRequest)
|
||||||
{
|
{
|
||||||
subcommandResponse = Transaction2SubcommandHelper.GetSubcommandResponse(header, (Transaction2QueryFileInformationRequest)subcommand, share, state);
|
subcommandResponse = Transaction2SubcommandHelper.GetSubcommandResponse(header, maxDataCount, (Transaction2QueryFileInformationRequest)subcommand, share, state);
|
||||||
}
|
}
|
||||||
else if (subcommand is Transaction2SetFileInformationRequest)
|
else if (subcommand is Transaction2SetFileInformationRequest)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue