mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-05-19 18:59:23 +02:00
Renamed ShareCollection to SMBShareCollection
This commit is contained in:
parent
a7af73ae2d
commit
82f308b576
6 changed files with 9 additions and 9 deletions
|
@ -199,7 +199,7 @@
|
||||||
<Compile Include="Server\Shares\FileSystemShare.cs" />
|
<Compile Include="Server\Shares\FileSystemShare.cs" />
|
||||||
<Compile Include="Server\Shares\ISMBShare.cs" />
|
<Compile Include="Server\Shares\ISMBShare.cs" />
|
||||||
<Compile Include="Server\Shares\NamedPipeShare.cs" />
|
<Compile Include="Server\Shares\NamedPipeShare.cs" />
|
||||||
<Compile Include="Server\Shares\ShareCollection.cs" />
|
<Compile Include="Server\Shares\SMBShareCollection.cs" />
|
||||||
<Compile Include="Server\SMB1\FileStoreResponseHelper.cs" />
|
<Compile Include="Server\SMB1\FileStoreResponseHelper.cs" />
|
||||||
<Compile Include="Server\SMB1\NegotiateHelper.cs" />
|
<Compile Include="Server\SMB1\NegotiateHelper.cs" />
|
||||||
<Compile Include="Server\SMB1\NTCreateHelper.cs" />
|
<Compile Include="Server\SMB1\NTCreateHelper.cs" />
|
||||||
|
|
|
@ -14,7 +14,7 @@ namespace SMBLibrary.Server.SMB1
|
||||||
{
|
{
|
||||||
internal class TreeConnectHelper
|
internal class TreeConnectHelper
|
||||||
{
|
{
|
||||||
internal static SMB1Command GetTreeConnectResponse(SMB1Header header, TreeConnectAndXRequest request, SMB1ConnectionState state, NamedPipeShare services, ShareCollection shares)
|
internal static SMB1Command GetTreeConnectResponse(SMB1Header header, TreeConnectAndXRequest request, SMB1ConnectionState state, NamedPipeShare services, SMBShareCollection shares)
|
||||||
{
|
{
|
||||||
SMB1Session session = state.GetSession(header.UID);
|
SMB1Session session = state.GetSession(header.UID);
|
||||||
bool isExtended = (request.Flags & TreeConnectFlags.ExtendedResponse) > 0;
|
bool isExtended = (request.Flags & TreeConnectFlags.ExtendedResponse) > 0;
|
||||||
|
|
|
@ -14,7 +14,7 @@ namespace SMBLibrary.Server.SMB2
|
||||||
{
|
{
|
||||||
internal class TreeConnectHelper
|
internal class TreeConnectHelper
|
||||||
{
|
{
|
||||||
internal static SMB2Command GetTreeConnectResponse(TreeConnectRequest request, SMB2ConnectionState state, NamedPipeShare services, ShareCollection shares)
|
internal static SMB2Command GetTreeConnectResponse(TreeConnectRequest request, SMB2ConnectionState state, NamedPipeShare services, SMBShareCollection shares)
|
||||||
{
|
{
|
||||||
SMB2Session session = state.GetSession(request.Header.SessionID);
|
SMB2Session session = state.GetSession(request.Header.SessionID);
|
||||||
TreeConnectResponse response = new TreeConnectResponse();
|
TreeConnectResponse response = new TreeConnectResponse();
|
||||||
|
|
|
@ -25,7 +25,7 @@ namespace SMBLibrary.Server
|
||||||
public const string NTLanManagerDialect = "NT LM 0.12";
|
public const string NTLanManagerDialect = "NT LM 0.12";
|
||||||
public const bool EnableExtendedSecurity = true;
|
public const bool EnableExtendedSecurity = true;
|
||||||
|
|
||||||
private ShareCollection m_shares; // e.g. Shared folders
|
private SMBShareCollection m_shares; // e.g. Shared folders
|
||||||
private GSSProvider m_securityProvider;
|
private GSSProvider m_securityProvider;
|
||||||
private NamedPipeShare m_services; // Named pipes
|
private NamedPipeShare m_services; // Named pipes
|
||||||
private Guid m_serverGuid;
|
private Guid m_serverGuid;
|
||||||
|
@ -42,7 +42,7 @@ namespace SMBLibrary.Server
|
||||||
|
|
||||||
public event EventHandler<LogEntry> OnLogEntry;
|
public event EventHandler<LogEntry> OnLogEntry;
|
||||||
|
|
||||||
public SMBServer(ShareCollection shares, GSSProvider securityProvider)
|
public SMBServer(SMBShareCollection shares, GSSProvider securityProvider)
|
||||||
{
|
{
|
||||||
m_shares = shares;
|
m_shares = shares;
|
||||||
m_securityProvider = securityProvider;
|
m_securityProvider = securityProvider;
|
||||||
|
|
|
@ -11,7 +11,7 @@ using Utilities;
|
||||||
|
|
||||||
namespace SMBLibrary.Server
|
namespace SMBLibrary.Server
|
||||||
{
|
{
|
||||||
public class ShareCollection : List<FileSystemShare>
|
public class SMBShareCollection : List<FileSystemShare>
|
||||||
{
|
{
|
||||||
public void Add(string shareName, IFileSystem fileSystem)
|
public void Add(string shareName, IFileSystem fileSystem)
|
||||||
{
|
{
|
|
@ -84,7 +84,7 @@ namespace SMBServer
|
||||||
authenticationMechanism = new IndependentNTLMAuthenticationProvider(users.GetUserPassword);
|
authenticationMechanism = new IndependentNTLMAuthenticationProvider(users.GetUserPassword);
|
||||||
}
|
}
|
||||||
|
|
||||||
ShareCollection shares;
|
SMBShareCollection shares;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
shares = ReadShareSettings();
|
shares = ReadShareSettings();
|
||||||
|
@ -150,9 +150,9 @@ namespace SMBServer
|
||||||
return users;
|
return users;
|
||||||
}
|
}
|
||||||
|
|
||||||
private ShareCollection ReadShareSettings()
|
private SMBShareCollection ReadShareSettings()
|
||||||
{
|
{
|
||||||
ShareCollection shares = new ShareCollection();
|
SMBShareCollection shares = new SMBShareCollection();
|
||||||
XmlDocument document = GetSettingsXML();
|
XmlDocument document = GetSettingsXML();
|
||||||
XmlNode sharesNode = document.SelectSingleNode("Settings/Shares");
|
XmlNode sharesNode = document.SelectSingleNode("Settings/Shares");
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue