mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Truncate the CIFS server name is longer than 15 characters and output a warning. Fix for AR-1118.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5046 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -823,6 +823,20 @@ public class ServerConfiguration extends AbstractLifecycleBean
|
||||
throw new AlfrescoRuntimeException("CIFS server name must be unique");
|
||||
}
|
||||
|
||||
// Check if the host name is longer than 15 characters. NetBIOS only allows a maximum of 16 characters in the
|
||||
// server name with the last character reserved for the service type.
|
||||
|
||||
if ( hostName.length() > 15)
|
||||
{
|
||||
// Truncate the CIFS server name
|
||||
|
||||
hostName = hostName.substring(0, 15);
|
||||
|
||||
// Output a warning
|
||||
|
||||
logger.warn("CIFS server name is longer than 15 characters, truncated to " + hostName);
|
||||
}
|
||||
|
||||
// Set the CIFS server name
|
||||
|
||||
setServerName(hostName.toUpperCase());
|
||||
|
Reference in New Issue
Block a user