mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merged V2.0 to HEAD
svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V2.0@5086 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V2.0@5087 . IPC$ name pipe svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V2.0@5092 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V2.0@5093 . MSWord support. AR-1228. Added FLOSS to new file git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5301 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -666,7 +666,7 @@ public class NTProtocolHandler extends CoreProtocolHandler
|
||||
|
||||
// Map the IPC$ share to the admin pipe type
|
||||
|
||||
if (servType == ShareType.NAMEDPIPE && share.getShareName().compareTo("IPC$") == 0)
|
||||
if (share.getShareName().compareTo("IPC$") == 0)
|
||||
servType = ShareType.ADMINPIPE;
|
||||
|
||||
// Check if the session is a null session, only allow access to the IPC$ named pipe share
|
||||
@@ -1194,7 +1194,7 @@ public class NTProtocolHandler extends CoreProtocolHandler
|
||||
|
||||
// Map the IPC$ share to the admin pipe type
|
||||
|
||||
if (servType == ShareType.NAMEDPIPE && shareName.compareTo("IPC$") == 0)
|
||||
if (shareName.compareTo("IPC$") == 0)
|
||||
servType = ShareType.ADMINPIPE;
|
||||
|
||||
// Check if the session is a null session, only allow access to the IPC$ named pipe share
|
||||
@@ -2096,7 +2096,7 @@ public class NTProtocolHandler extends CoreProtocolHandler
|
||||
|
||||
// Return an error status
|
||||
|
||||
m_sess.sendErrorResponseSMB(SMBStatus.DOSNotLocked, SMBStatus.ErrDos);
|
||||
m_sess.sendErrorResponseSMB(SMBStatus.NTRangeNotLocked, SMBStatus.DOSNotLocked, SMBStatus.ErrDos);
|
||||
return;
|
||||
}
|
||||
catch (LockConflictException ex)
|
||||
@@ -2104,9 +2104,7 @@ public class NTProtocolHandler extends CoreProtocolHandler
|
||||
|
||||
// Return an error status
|
||||
|
||||
m_sess
|
||||
.sendErrorResponseSMB(SMBStatus.NTLockNotGranted, SMBStatus.DOSLockConflict,
|
||||
SMBStatus.ErrDos);
|
||||
m_sess.sendErrorResponseSMB(SMBStatus.NTLockNotGranted, SMBStatus.DOSLockConflict, SMBStatus.ErrDos);
|
||||
return;
|
||||
}
|
||||
catch (IOException ex)
|
||||
@@ -2136,7 +2134,7 @@ public class NTProtocolHandler extends CoreProtocolHandler
|
||||
|
||||
// Return an error status
|
||||
|
||||
m_sess.sendErrorResponseSMB(SMBStatus.DOSNotLocked, SMBStatus.ErrDos);
|
||||
m_sess.sendErrorResponseSMB(SMBStatus.NTRangeNotLocked, SMBStatus.DOSNotLocked, SMBStatus.ErrDos);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@@ -50,12 +50,15 @@ import org.alfresco.filesys.server.filesys.FileStatus;
|
||||
import org.alfresco.filesys.server.filesys.NetworkFile;
|
||||
import org.alfresco.filesys.server.filesys.SearchContext;
|
||||
import org.alfresco.filesys.server.filesys.TreeConnection;
|
||||
import org.alfresco.filesys.server.locking.FileLockingInterface;
|
||||
import org.alfresco.filesys.server.locking.LockManager;
|
||||
import org.alfresco.filesys.server.pseudo.MemoryNetworkFile;
|
||||
import org.alfresco.filesys.server.pseudo.PseudoFile;
|
||||
import org.alfresco.filesys.server.pseudo.PseudoFileInterface;
|
||||
import org.alfresco.filesys.server.pseudo.PseudoFileList;
|
||||
import org.alfresco.filesys.server.pseudo.PseudoNetworkFile;
|
||||
import org.alfresco.filesys.server.state.FileState;
|
||||
import org.alfresco.filesys.server.state.FileStateLockManager;
|
||||
import org.alfresco.filesys.server.state.FileState.FileStateStatus;
|
||||
import org.alfresco.filesys.smb.SharingMode;
|
||||
import org.alfresco.filesys.smb.server.SMBSrvSession;
|
||||
@@ -84,7 +87,7 @@ import org.apache.commons.logging.LogFactory;
|
||||
*
|
||||
* @author Derek Hulley
|
||||
*/
|
||||
public class ContentDiskDriver extends AlfrescoDiskDriver implements DiskInterface
|
||||
public class ContentDiskDriver extends AlfrescoDiskDriver implements DiskInterface, FileLockingInterface
|
||||
{
|
||||
// Logging
|
||||
|
||||
@@ -113,6 +116,10 @@ public class ContentDiskDriver extends AlfrescoDiskDriver implements DiskInterfa
|
||||
|
||||
private AuthenticationComponent authComponent;
|
||||
private AuthenticationService authService;
|
||||
|
||||
// Lock manager
|
||||
|
||||
private static LockManager _lockManager = new FileStateLockManager();
|
||||
|
||||
/**
|
||||
* Class constructor
|
||||
@@ -1288,6 +1295,10 @@ public class ContentDiskDriver extends AlfrescoDiskDriver implements DiskInterfa
|
||||
|
||||
fstate.incrementOpenCount();
|
||||
fstate.setNodeRef(nodeRef);
|
||||
|
||||
// Store the state with the file
|
||||
|
||||
netFile.setFileState( fstate);
|
||||
}
|
||||
|
||||
// If the file has been opened for overwrite then truncate the file to zero length, this will
|
||||
@@ -1415,6 +1426,10 @@ public class ContentDiskDriver extends AlfrescoDiskDriver implements DiskInterfa
|
||||
fstate.incrementOpenCount();
|
||||
fstate.setNodeRef(nodeRef);
|
||||
|
||||
// Store the file state with the file
|
||||
|
||||
netFile.setFileState( fstate);
|
||||
|
||||
// DEBUG
|
||||
|
||||
if ( logger.isDebugEnabled())
|
||||
@@ -2367,4 +2382,15 @@ public class ContentDiskDriver extends AlfrescoDiskDriver implements DiskInterfa
|
||||
{
|
||||
// Nothing to do
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the lock manager used by this filesystem
|
||||
*
|
||||
* @param sess SrvSession
|
||||
* @param tree TreeConnection
|
||||
* @return LockManager
|
||||
*/
|
||||
public LockManager getLockManager(SrvSession sess, TreeConnection tree) {
|
||||
return _lockManager;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user