Changed DCE/RPC Server and Workstation services to always report the server version as NT 5.1,

reporting the older caused some weird problems once the filesystem was set to NTFS.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2765 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gary Spencer
2006-05-04 15:53:04 +00:00
parent 07e63009ff
commit 35f3eda32f
2 changed files with 8 additions and 30 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2005 Alfresco, Inc.
* Copyright (C) 2005-2006 Alfresco, Inc.
*
* Licensed under the Mozilla Public License version 1.1
* with a permitted attribution clause. You may obtain a
@@ -21,11 +21,9 @@ import java.util.Enumeration;
import java.util.Vector;
import org.alfresco.filesys.server.auth.acl.AccessControlManager;
import org.alfresco.filesys.server.config.ServerConfiguration;
import org.alfresco.filesys.server.core.ShareType;
import org.alfresco.filesys.server.core.SharedDevice;
import org.alfresco.filesys.server.core.SharedDeviceList;
import org.alfresco.filesys.smb.Dialect;
import org.alfresco.filesys.smb.SMBStatus;
import org.alfresco.filesys.smb.dcerpc.DCEBuffer;
import org.alfresco.filesys.smb.dcerpc.DCEBufferException;
@@ -375,19 +373,10 @@ public class SrvsvcDCEHandler implements DCEHandler
srvInfo.setComment(srv.getComment());
srvInfo.setServerType(srv.getServerType());
// Determine if the server is using the NT SMB dialect and set the platofmr id accordingly
// Return the platform id as Windows NT
ServerConfiguration srvConfig = srv.getConfiguration();
if (srvConfig != null && srvConfig.getEnabledDialects().hasDialect(Dialect.NT) == true)
{
srvInfo.setPlatformId(ServerInfo.PLATFORM_NT);
srvInfo.setVersion(5, 1);
}
else
{
srvInfo.setPlatformId(ServerInfo.PLATFORM_OS2);
srvInfo.setVersion(4, 0);
}
srvInfo.setPlatformId(ServerInfo.PLATFORM_NT);
srvInfo.setVersion(5, 1);
// Write the server information to the DCE response

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2005 Alfresco, Inc.
* Copyright (C) 2005-2006 Alfresco, Inc.
*
* Licensed under the Mozilla Public License version 1.1
* with a permitted attribution clause. You may obtain a
@@ -18,8 +18,6 @@ package org.alfresco.filesys.smb.dcerpc.server;
import java.io.IOException;
import org.alfresco.filesys.server.config.ServerConfiguration;
import org.alfresco.filesys.smb.Dialect;
import org.alfresco.filesys.smb.SMBStatus;
import org.alfresco.filesys.smb.dcerpc.DCEBuffer;
import org.alfresco.filesys.smb.dcerpc.DCEBufferException;
@@ -152,19 +150,10 @@ public class WkssvcDCEHandler implements DCEHandler
wkstaInfo.setWorkstationName(srv.getServerName());
wkstaInfo.setDomain(srv.getConfiguration().getDomainName());
// Determine if the server is using the NT SMB dialect and set the platofmr id accordingly
// Return the platform type as Windows NT
ServerConfiguration srvConfig = sess.getServer().getConfiguration();
if (srvConfig != null && srvConfig.getEnabledDialects().hasDialect(Dialect.NT) == true)
{
wkstaInfo.setPlatformId(ServerInfo.PLATFORM_NT);
wkstaInfo.setVersion(5, 1);
}
else
{
wkstaInfo.setPlatformId(ServerInfo.PLATFORM_OS2);
wkstaInfo.setVersion(4, 0);
}
wkstaInfo.setPlatformId(ServerInfo.PLATFORM_NT);
wkstaInfo.setVersion(5, 1);
// Write the server information to the DCE response