|
@@ -24,6 +24,12 @@ namespace SMBLibrary.Server.SMB1
|
|
|
OptionalSupportFlags supportFlags;
|
|
|
if (String.Equals(shareName, NamedPipeShare.NamedPipeShareName, StringComparison.OrdinalIgnoreCase))
|
|
|
{
|
|
|
+ if (request.Service != ServiceName.AnyType && request.Service != ServiceName.NamedPipe)
|
|
|
+ {
|
|
|
+ header.Status = NTStatus.STATUS_BAD_DEVICE_TYPE;
|
|
|
+ return new ErrorResponse(request.CommandName);
|
|
|
+ }
|
|
|
+
|
|
|
share = services;
|
|
|
serviceName = ServiceName.NamedPipe;
|
|
|
supportFlags = OptionalSupportFlags.SMB_SUPPORT_SEARCH_BITS | OptionalSupportFlags.SMB_CSC_NO_CACHING;
|
|
@@ -37,6 +43,12 @@ namespace SMBLibrary.Server.SMB1
|
|
|
return new ErrorResponse(request.CommandName);
|
|
|
}
|
|
|
|
|
|
+ if (request.Service != ServiceName.AnyType && request.Service != ServiceName.DiskShare)
|
|
|
+ {
|
|
|
+ header.Status = NTStatus.STATUS_BAD_DEVICE_TYPE;
|
|
|
+ return new ErrorResponse(request.CommandName);
|
|
|
+ }
|
|
|
+
|
|
|
serviceName = ServiceName.DiskShare;
|
|
|
supportFlags = OptionalSupportFlags.SMB_SUPPORT_SEARCH_BITS | GetCachingSupportFlags(((FileSystemShare)share).CachingPolicy);
|
|
|
|