├── .gitignore
├── test
├── runtests.bat
├── runtests.sh
└── clusterTests.xml
└── src
└── main
└── java
└── org
├── filesys
├── util
│ ├── db
│ │ ├── DBStatus.java
│ │ ├── DBConnectionPoolListener.java
│ │ └── DBCallbacks.java
│ ├── BadHexFormatException.java
│ ├── X64.java
│ ├── FileDateTime.java
│ └── win32
│ │ └── Kernel32Ex.java
├── smb
│ ├── Compression.java
│ ├── server
│ │ ├── Protocol.java
│ │ ├── SetupObjectType.java
│ │ ├── SessionState.java
│ │ ├── PipeDevice.java
│ │ ├── nio
│ │ │ ├── RequestHandlerListener.java
│ │ │ └── AsynchronousWritesHandler.java
│ │ ├── OpenAndX.java
│ │ ├── Find.java
│ │ ├── Mode.java
│ │ ├── UnsupportedSMBVersionException.java
│ │ ├── SecurityMode.java
│ │ ├── AdminSharedDevice.java
│ │ ├── SrvSessionFactory.java
│ │ ├── SMBChildConnectionHandler.java
│ │ ├── KeyType.java
│ │ └── ParserFactory.java
│ ├── dcerpc
│ │ ├── info
│ │ │ └── DsRoleMachineRole.java
│ │ ├── DCEException.java
│ │ ├── DCEBufferException.java
│ │ ├── DCEReadableList.java
│ │ ├── DCEWriteableList.java
│ │ ├── Wkssvc.java
│ │ ├── LsaRpc.java
│ │ ├── DCEReadable.java
│ │ └── DCEWriteable.java
│ ├── TcpipSMB.java
│ ├── TransactionNames.java
│ ├── SeekType.java
│ ├── NTSecurity.java
│ ├── FindFirstNext.java
│ ├── DataType.java
│ ├── nt
│ │ ├── LoadException.java
│ │ └── SaveException.java
│ ├── UnsupportedDeviceTypeException.java
│ ├── InvalidUNCPathException.java
│ └── UnknownLocalDomainException.java
├── audit
│ ├── AuditGroup.java
│ └── AuditType.java
├── oncrpc
│ ├── nfs
│ │ ├── NFS.java
│ │ ├── nio
│ │ │ └── NFSRequestHandlerListener.java
│ │ ├── BadCookieException.java
│ │ ├── BadHandleException.java
│ │ ├── StaleHandleException.java
│ │ └── RpcSessionProcessor.java
│ ├── RpcProcessor.java
│ └── RpcPacketHandler.java
├── server
│ ├── filesys
│ │ ├── SearchFlags.java
│ │ ├── FileStatus.java
│ │ ├── TransactionalMarkerInterface.java
│ │ ├── FileType.java
│ │ ├── clientapi
│ │ │ ├── json
│ │ │ │ ├── DecodeException.java
│ │ │ │ ├── PathStatus.java
│ │ │ │ ├── SuccessResponse.java
│ │ │ │ ├── GetPathStatusResponse.java
│ │ │ │ └── ClientAPIResponse.java
│ │ │ ├── ApiRequest.java
│ │ │ ├── ApiResponse.java
│ │ │ └── ClientAPI.java
│ │ ├── cache
│ │ │ ├── NetworkFileStateInterface.java
│ │ │ ├── FileStateProxy.java
│ │ │ ├── FileStateCacheListener.java
│ │ │ ├── hazelcast
│ │ │ │ └── ClusterMessageType.java
│ │ │ ├── LocalFileAccessToken.java
│ │ │ ├── StateCacheException.java
│ │ │ ├── FileStateListener.java
│ │ │ └── LocalFileStateProxy.java
│ │ ├── loader
│ │ │ ├── InMemoryLoader.java
│ │ │ └── FileLoaderException.java
│ │ ├── DiskVolumeInterface.java
│ │ ├── FileSharingException.java
│ │ ├── quota
│ │ │ └── QuotaManagerException.java
│ │ ├── pseudo
│ │ │ └── PseudoFileInfo.java
│ │ ├── postprocess
│ │ │ ├── PostRequestProcessor.java
│ │ │ └── PostCloseProcessor.java
│ │ ├── DeviceAttribute.java
│ │ ├── DiskFullException.java
│ │ ├── FileListener.java
│ │ ├── TooManySearchesException.java
│ │ ├── FileNameException.java
│ │ ├── NotifyAction.java
│ │ ├── DeferFailedException.java
│ │ ├── DiskSizeInterface.java
│ │ ├── FileExistsException.java
│ │ ├── TooManyFilesException.java
│ │ ├── UnsupportedInfoLevelException.java
│ │ ├── IOControlNotImplementedException.java
│ │ ├── FileOfflineException.java
│ │ ├── PathNotFoundException.java
│ │ ├── DiskOfflineException.java
│ │ ├── FilesystemPendingException.java
│ │ ├── TooManyConnectionsException.java
│ │ ├── DeferredPacketException.java
│ │ ├── db
│ │ │ └── DBException.java
│ │ ├── ExistingOpLockOwnerException.java
│ │ ├── FileIdInterface.java
│ │ ├── ShareListener.java
│ │ └── MediaOfflineException.java
│ ├── auth
│ │ ├── AuthContext.java
│ │ ├── ClientInfoFactory.java
│ │ ├── DefaultClientInfoFactory.java
│ │ ├── AuthenticatorException.java
│ │ ├── InvalidUserException.java
│ │ ├── acl
│ │ │ ├── ACLParseException.java
│ │ │ └── InvalidACLTypeException.java
│ │ ├── ChallengeAuthContext.java
│ │ ├── TransactionalSMBAuthenticator.java
│ │ ├── passthru
│ │ │ └── DomainMapping.java
│ │ └── ntlm
│ │ │ └── StringTargetInfo.java
│ ├── thread
│ │ └── ThreadRequest.java
│ ├── locking
│ │ ├── BreakLevel.java
│ │ ├── InvalidOplockStateException.java
│ │ └── FileLockingInterface.java
│ ├── config
│ │ ├── ServerActiveException.java
│ │ ├── ServerConfigurationAccessor.java
│ │ └── IncompleteConfigurationException.java
│ ├── Version.java
│ ├── ServerListener.java
│ ├── core
│ │ ├── InvalidDeviceInterfaceException.java
│ │ └── DeviceContextException.java
│ └── SessionHandlerInterface.java
├── netbios
│ ├── server
│ │ ├── LANAListener.java
│ │ ├── AddNameListener.java
│ │ ├── PacketReceiver.java
│ │ ├── QueryNameListener.java
│ │ ├── LANAMonitor.java
│ │ └── RemoteNameListener.java
│ ├── NetBIOSException.java
│ └── NameTemplateException.java
├── ftp
│ └── InvalidPathException.java
├── locking
│ ├── FileLockException.java
│ ├── FileUnlockException.java
│ ├── NotLockedException.java
│ └── LockConflictException.java
└── debug
│ └── ConsoleDebug.java
└── springframework
└── extensions
└── config
└── element
└── GenericConfigElement.java
/.gitignore:
--------------------------------------------------------------------------------
1 | release.properties
2 | .idea/*
3 | saved/*
4 |
--------------------------------------------------------------------------------
/test/runtests.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 | echo Alfresco JLAN Server Tests
3 | java -cp .\jars\alfresco-jlan-full.jar;.\libs\cryptix-jce-provider.jar org.filesys.jlan.test.cluster.ClusterTest clusterTests.xml
4 |
--------------------------------------------------------------------------------
/test/runtests.sh:
--------------------------------------------------------------------------------
1 | # ! /bin/sh
2 |
3 | echo Alfresco JLAN Server Tests
4 | java -cp ./jars/alfresco-jlan-full.jar:./libs/cryptix-jce-provider.jar org.filesys.jlan.test.cluster.ClusterTest clusterTests.xml
5 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/util/db/DBStatus.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020 GK Spencer
3 | *
4 | * JFileServer is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU Lesser General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * JFileServer is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public License
15 | * along with JFileServer. If not, see
Holds authentication specific information for the negotiate/session setup phase of a new SMB session.
26 | *
27 | * @author gkspencer
28 | */
29 | public class AuthContext
30 | {
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/smb/dcerpc/info/DsRoleMachineRole.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2023 GK Spencer
3 | *
4 | * JFileServer is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU Lesser General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * JFileServer is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public License
15 | * along with JFileServer. If not, see
Empty interface used as a marker on transactional filesystems that do not need to use the 23 | * TransactionalFilesystemInterface methods.
24 | * 25 | * @author gkspencer 26 | */ 27 | public interface TransactionalMarkerInterface { 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/org/filesys/server/filesys/FileType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2006-2010 Alfresco Software Limited. 3 | * Copyright (C) 2018 GK Spencer 4 | * 5 | * This file is part of Alfresco 6 | * 7 | * Alfresco is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * Alfresco is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with Alfresco. If not, seeFile type constants.
27 | *
28 | * @author gkspencer
29 | */
30 | public enum FileType {
31 | RegularFile,
32 | Directory,
33 | SymbolicLink,
34 | HardLink,
35 | Device
36 | }
37 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/smb/server/SessionState.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2018 GK Spencer
3 | *
4 | * JFileServer is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU Lesser General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * JFileServer is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public License
15 | * along with JFileServer. If not, see
Contains the various states that an SMB server session will go through during the session
22 | * lifetime.
23 | *
24 | * @author gkspencer
25 | */
26 | public enum SessionState {
27 | NETBIOS_SESS_REQUEST,
28 | SMB_NEGOTIATE,
29 | SMB_SESSSETUP,
30 | SMB_SESSION,
31 | SMB_CLOSED,
32 | SESS_HANGUP;
33 | }
34 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/smb/server/PipeDevice.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2006-2010 Alfresco Software Limited.
3 | *
4 | * This file is part of Alfresco
5 | *
6 | * Alfresco is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Lesser General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * Alfresco is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public License
17 | * along with Alfresco. If not, see
Runnable item that can be queued to a thread pool for processing.
26 | *
27 | * @author gkspencer
28 | */
29 | public interface ThreadRequest {
30 |
31 | /**
32 | * Run the request
33 | */
34 | public void runRequest();
35 | }
36 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/smb/TcpipSMB.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2006-2010 Alfresco Software Limited.
3 | *
4 | * This file is part of Alfresco
5 | *
6 | * Alfresco is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Lesser General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * Alfresco is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public License
17 | * along with Alfresco. If not, see
Per path status values returned from the server for a multi path request
23 | * 24 | * @author gkspencer 25 | */ 26 | public enum PathStatus { 27 | Success, 28 | NotProcessed, 29 | PathNotExist, 30 | PathIsAFile, 31 | PathIsAFolder, 32 | NotWritable, 33 | Locked, 34 | WorkingCopy, 35 | NotWorkingCopy 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/org/filesys/server/filesys/clientapi/json/SuccessResponse.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2023 GK Spencer 3 | * 4 | * JFileServer is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU Lesser General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * JFileServer is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public License 15 | * along with JFileServer. If not, seeOplock level to break to
24 | * 25 | * @author gkspencer 26 | */ 27 | public class BreakLevel { 28 | 29 | // Oplock break levels 30 | public static final int LEVEL_NONE = 0x00; 31 | public static final int LEVEL_II = 0x01; 32 | public static final int LEVEL_EXCLUSIVE = 0x08; 33 | public static final int LEVEL_LEASE = 0xFF; 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/org/filesys/smb/dcerpc/DCEException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2006-2010 Alfresco Software Limited. 3 | * 4 | * This file is part of Alfresco 5 | * 6 | * Alfresco is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Lesser General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Alfresco is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with Alfresco. If not, seeUsed by NetworkFile implementations that use file state caching.
26 | *
27 | * @author gkspencer
28 | */
29 | public interface NetworkFileStateInterface {
30 |
31 | /**
32 | * Return the file state
33 | *
34 | * @return FileState
35 | */
36 | public FileState getFileState();
37 | }
38 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/netbios/server/LANAListener.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2006-2010 Alfresco Software Limited.
3 | *
4 | * This file is part of Alfresco
5 | *
6 | * Alfresco is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Lesser General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * Alfresco is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public License
17 | * along with Alfresco. If not, see
Receive status change events for a particular NetBIOS LANA.
26 | *
27 | * @author gkspencer
28 | */
29 | public interface LANAListener {
30 |
31 | /**
32 | * LANA status change callback
33 | *
34 | * @param lana int
35 | * @param online boolean
36 | */
37 | public void lanaStatusChange(int lana, boolean online);
38 | }
39 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/smb/SeekType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2006-2010 Alfresco Software Limited.
3 | *
4 | * This file is part of Alfresco
5 | *
6 | * Alfresco is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Lesser General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * Alfresco is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public License
17 | * along with Alfresco. If not, see
Defines constants used by the SeekFile SMB request to specify where the seek position is relative to.
26 | *
27 | * @author gkspencer
28 | */
29 | public class SeekType {
30 |
31 | // Seek file types
32 | public static final int StartOfFile = 0;
33 | public static final int CurrentPos = 1;
34 | public static final int EndOfFile = 2;
35 | }
36 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/netbios/server/AddNameListener.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2006-2010 Alfresco Software Limited.
3 | *
4 | * This file is part of Alfresco
5 | *
6 | * Alfresco is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Lesser General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * Alfresco is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public License
17 | * along with Alfresco. If not, see
Used to communicate database connection events such as the database server online/offline status.
26 | *
27 | * @author gkspencer
28 | */
29 | public interface DBConnectionPoolListener {
30 |
31 | /**
32 | * Database online/offline status event
33 | *
34 | * @param dbSts DBStatus
35 | */
36 | public void databaseOnlineStatus(DBStatus dbSts);
37 | }
38 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/smb/server/Mode.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2018 GK Spencer
3 | *
4 | * JFileServer is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU Lesser General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * JFileServer is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public License
15 | * along with JFileServer. If not, see
Used to store a link to a file state. Depending on the file state cache implementation
26 | * the proxy may reference the actual file state or retrieve it.
27 | *
28 | * @author gkspencer
29 | */
30 | public interface FileStateProxy {
31 |
32 | /**
33 | * Return the file state object
34 | *
35 | * @return FileState
36 | */
37 | public FileState getFileState();
38 | }
39 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/smb/server/UnsupportedSMBVersionException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2018 GK Spencer
3 | *
4 | * JFileServer is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU Lesser General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * JFileServer is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public License
15 | * along with JFileServer. If not, see
29 | * Check if the platform is a 64bit operating system.
30 | *
31 | * @author gkspencer
32 | */
33 | public class X64 {
34 |
35 | /**
36 | * Check if we are running on a Windows 64bit system
37 | *
38 | * @return boolean
39 | */
40 | public static boolean isWindows64() {
41 | return Platform.isWindows() && Platform.is64Bit();
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/smb/server/SecurityMode.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2006-2010 Alfresco Software Limited.
3 | *
4 | * This file is part of Alfresco
5 | *
6 | * Alfresco is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Lesser General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * Alfresco is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public License
17 | * along with Alfresco. If not, see
SMB security mode constants.
26 | *
27 | * @author gkspencer
28 | */
29 | public class SecurityMode {
30 |
31 | // Security mode flags returned in the SMB negotiate response
32 | public static final int UserMode = 0x0001;
33 | public static final int EncryptedPasswords = 0x0002;
34 | public static final int SignaturesEnabled = 0x0004;
35 | public static final int SignaturesRequired = 0x0008;
36 | }
37 |
--------------------------------------------------------------------------------
/src/main/java/org/springframework/extensions/config/element/GenericConfigElement.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2005-2010 Alfresco Software Limited.
3 | *
4 | * This file is part of Alfresco
5 | *
6 | * Alfresco is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Lesser General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * Alfresco is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public License
17 | * along with Alfresco. If not, see
This class needs to match the Alfresco version of the class.
29 | */
30 | public class GenericConfigElement extends ConfigElementAdapter {
31 |
32 | /**
33 | * Class constructor
34 | *
35 | * @param name String
36 | */
37 | public GenericConfigElement(String name) {
38 | super( name, "");
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/server/filesys/cache/FileStateCacheListener.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2006-2010 Alfresco Software Limited.
3 | *
4 | * This file is part of Alfresco
5 | *
6 | * Alfresco is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Lesser General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * Alfresco is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public License
17 | * along with Alfresco. If not, see
Contains the cluster message type ids.
26 | *
27 | * @author gkspencer
28 | */
29 | public enum ClusterMessageType {
30 | EchoString,
31 | OplockBreakRequest,
32 | OplockBreakNotify,
33 | FileStateUpdate,
34 | RenameState,
35 | DataUpdate,
36 | OplockTypeChange,
37 | OplockOwnerAdd,
38 | OplockOwnerRemove,
39 | OplockRemove,
40 | DebugLog
41 | }
42 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/audit/AuditType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020 GK Spencer
3 | *
4 | * JFileServer is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU Lesser General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * JFileServer is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public License
15 | * along with JFileServer. If not, see
Contains constants used by the Find First/Find Next SMB requests.
26 | *
27 | * @author gkspencer
28 | */
29 | public class FindFirstNext {
30 |
31 | // Find first/find next flags
32 | public static final int CloseSearch = 0x01;
33 | public static final int CloseAtEnd = 0x02;
34 | public static final int ReturnResumeKey = 0x04;
35 | public static final int ResumePrevious = 0x08;
36 | public static final int BackupIntent = 0x10;
37 | }
38 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/server/auth/DefaultClientInfoFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2006-2010 Alfresco Software Limited.
3 | *
4 | * This file is part of Alfresco
5 | *
6 | * Alfresco is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Lesser General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * Alfresco is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public License
17 | * along with Alfresco. If not, see
The InMemoryLoader interface adds methods required by the caching of file data in-memory
25 | * 26 | * @author gkspencer 27 | */ 28 | public interface InMemoryLoader { 29 | 30 | /** 31 | * Convert an in-memory cached file to a streamed file 32 | * 33 | * @param netFile MemCachedNetworkFile 34 | * @return boolean 35 | */ 36 | public boolean convertInMemoryToStreamedFile(MemCachedNetworkFile netFile); 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/org/filesys/smb/server/AdminSharedDevice.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2006-2010 Alfresco Software Limited. 3 | * 4 | * This file is part of Alfresco 5 | * 6 | * Alfresco is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Lesser General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Alfresco is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with Alfresco. If not, seeThis class contains the data types that are used within an SMB protocol
26 | * packet.
27 | *
28 | * @author gkspencer
29 | */
30 | public class DataType {
31 |
32 | // SMB data types
33 | public static final char DataBlock = (char) 0x01;
34 | public static final char Dialect = (char) 0x02;
35 | public static final char Pathname = (char) 0x03;
36 | public static final char ASCII = (char) 0x04;
37 | public static final char VariableBlock = (char) 0x05;
38 | }
39 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/ftp/InvalidPathException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2006-2010 Alfresco Software Limited.
3 | *
4 | * This file is part of Alfresco
5 | *
6 | * Alfresco is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Lesser General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * Alfresco is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public License
17 | * along with Alfresco. If not, see
A class that implements the DCEReadableList interface can read a list of DCEReadable objects from a
26 | * DCE/RPC buffer.
27 | *
28 | * @author gkspencer
29 | */
30 | public interface DCEReadableList {
31 |
32 | /**
33 | * Read the object state from the DCE/RPC buffer
34 | *
35 | * @param buf DCEBuffer
36 | * @throws DCEBufferException DCE buffer error
37 | */
38 | public void readObject(DCEBuffer buf)
39 | throws DCEBufferException;
40 | }
41 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/smb/dcerpc/DCEWriteableList.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2006-2010 Alfresco Software Limited.
3 | *
4 | * This file is part of Alfresco
5 | *
6 | * Alfresco is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Lesser General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * Alfresco is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public License
17 | * along with Alfresco. If not, see
A class that implements the DCEWriteableList interface can write a list of DCEWriteable objects
26 | * to a DCE/RPC buffer.
27 | *
28 | * @author gkspencer
29 | */
30 | public interface DCEWriteableList {
31 |
32 | /**
33 | * Write the object state to DCE/RPC buffers.
34 | *
35 | * @param buf DCEBuffer
36 | * @throws DCEBufferException DCE buffer error
37 | */
38 | public void writeObject(DCEBuffer buf)
39 | throws DCEBufferException;
40 | }
41 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/oncrpc/nfs/StaleHandleException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2006-2010 Alfresco Software Limited.
3 | *
4 | * This file is part of Alfresco
5 | *
6 | * Alfresco is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Lesser General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * Alfresco is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public License
17 | * along with Alfresco. If not, see
Optional interface that a DiskInterface driver can implement to provide disk volume information. The disk volume
26 | * information may also be specified via the configuration.
27 | *
28 | * @author gkspencer
29 | */
30 | public interface DiskVolumeInterface {
31 |
32 | /**
33 | * Return the disk device volume information.
34 | *
35 | * @param ctx DiskDeviceContext
36 | * @return VolumeInfo
37 | */
38 | public VolumeInfo getVolumeInformation(DiskDeviceContext ctx);
39 | }
40 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/smb/server/nio/AsynchronousWritesHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2006-2010 Alfresco Software Limited.
3 | *
4 | * This file is part of Alfresco
5 | *
6 | * Alfresco is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Lesser General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * Alfresco is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public License
17 | * along with Alfresco. If not, see
Indicates the oplock state is not as expected when setting oplock details or changing the oplock type
24 | * 25 | * @author gkspencer 26 | */ 27 | public class InvalidOplockStateException extends Exception { 28 | 29 | /** 30 | * Class constructor. 31 | */ 32 | public InvalidOplockStateException() { 33 | super(); 34 | } 35 | 36 | /** 37 | * Class constructor. 38 | * 39 | * @param msg String 40 | */ 41 | public InvalidOplockStateException(String msg) { 42 | super(msg); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/org/filesys/locking/FileUnlockException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2006-2010 Alfresco Software Limited. 3 | * 4 | * This file is part of Alfresco 5 | * 6 | * Alfresco is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Lesser General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Alfresco is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with Alfresco. If not, seeList of basic requests that a client API may implement. The client application will probe the filesystem 24 | * to see what requests the implementation supports
25 | * 26 | * @author gkspencer 27 | */ 28 | public enum ApiRequest { 29 | GetApiInfo, // get API version and supported requests 30 | GetUrlForPath, // return a URL for the specified path 31 | GetPathStatus, // return status for each path for a particular check type 32 | RunAction, // run a server side action 33 | 34 | Error // error type for response only 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/org/filesys/server/filesys/clientapi/ApiResponse.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2023 GK Spencer 3 | * 4 | * JFileServer is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU Lesser General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * JFileServer is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public License 15 | * along with JFileServer. If not, seeList of responses that a client API may return.
24 | * 25 | * @author gkspencer 26 | */ 27 | public enum ApiResponse { 28 | GetApiInfo, // return server API version and supported requests 29 | GetUrlForPath, // return a URL for the specified path 30 | GetPathStatus, // return path status info 31 | PathList, // success response with a list of relative paths 32 | ActionResult, // result of a server action 33 | 34 | Error, // error message 35 | Success // when no values need to be returned 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/org/filesys/smb/nt/LoadException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2006-2010 Alfresco Software Limited. 3 | * 4 | * This file is part of Alfresco 5 | * 6 | * Alfresco is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Lesser General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Alfresco is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with Alfresco. If not, seeThrown when an error occurs loading an ACE, ACL, SID or security descriptor from a buffer.
26 | *
27 | * @author gkspencer
28 | */
29 | public class LoadException extends Exception {
30 |
31 | private static final long serialVersionUID = 1593103389281754446L;
32 |
33 | /**
34 | * Default constructor
35 | */
36 | public LoadException() {
37 | super();
38 | }
39 |
40 | /**
41 | * Class constructor
42 | *
43 | * @param msg String
44 | */
45 | public LoadException(String msg) {
46 | super(msg);
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/smb/nt/SaveException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2006-2010 Alfresco Software Limited.
3 | *
4 | * This file is part of Alfresco
5 | *
6 | * Alfresco is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Lesser General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * Alfresco is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public License
17 | * along with Alfresco. If not, see
Thrown when an error occurs saving an ACE, ACL, SID or security descriptor to a buffer.
26 | *
27 | * @author gkspencer
28 | */
29 | public class SaveException extends Exception {
30 |
31 | private static final long serialVersionUID = -4577888276843040784L;
32 |
33 | /**
34 | * Default constructor
35 | */
36 | public SaveException() {
37 | super();
38 | }
39 |
40 | /**
41 | * Class constructor
42 | *
43 | * @param msg String
44 | */
45 | public SaveException(String msg) {
46 | super(msg);
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/server/auth/ChallengeAuthContext.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2006-2010 Alfresco Software Limited.
3 | *
4 | * This file is part of Alfresco
5 | *
6 | * Alfresco is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Lesser General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * Alfresco is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public License
17 | * along with Alfresco. If not, see
Contains a challenge to be sent to a client for password hashing.
26 | *
27 | * @author gkspencer
28 | */
29 | public class ChallengeAuthContext extends AuthContext {
30 |
31 | // Challenge sent to client
32 | protected byte[] m_challenge;
33 |
34 | /**
35 | * Default constructor
36 | */
37 | public ChallengeAuthContext() {
38 | }
39 |
40 | /**
41 | * Get the challenge
42 | *
43 | * @return byte[]
44 | */
45 | public byte[] getChallenge() {
46 | return m_challenge;
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/server/filesys/postprocess/PostRequestProcessor.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 GK Spencer
3 | *
4 | * JFileServer is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU Lesser General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * JFileServer is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public License
15 | * along with JFileServer. If not, see
Implementations call into a filesystem driver to run additional code after a request has been processed and 25 | * the response has been sent to the client by the protocol layer
26 | * 27 | * @author gkspencer 28 | */ 29 | public interface PostRequestProcessor { 30 | 31 | /** 32 | * Run the post request processor, the implementation must store the required context for the callback 33 | * 34 | * @exception IOException I/O error occurred 35 | */ 36 | public void runPostProcessor() 37 | throws IOException; 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/org/filesys/util/db/DBCallbacks.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2020 GK Spencer 3 | * 4 | * JFileServer is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU Lesser General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * JFileServer is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public License 15 | * along with JFileServer. If not, seeCallbacks from the DBConnectionPool
26 | * 27 | * @author gkspencer 28 | */ 29 | public interface DBCallbacks { 30 | 31 | /** 32 | * Override the default creation of a new database connection for the connection pool 33 | * 34 | * @param dsn String 35 | * @param user String 36 | * @param pass String 37 | * @return Connection 38 | * @exception SQLException If an error occurs creating the connection 39 | */ 40 | Connection createConnectionForPool(String dsn, String user, String pass) 41 | throws SQLException; 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/org/filesys/smb/server/SrvSessionFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2006-2010 Alfresco Software Limited. 3 | * 4 | * This file is part of Alfresco 5 | * 6 | * Alfresco is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Lesser General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Alfresco is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with Alfresco. If not, seeThrown when a NetBIOS name template contains invalid characters or is too long.
26 | *
27 | * @author gkspencer
28 | */
29 | public class NameTemplateException extends Exception {
30 |
31 | private static final long serialVersionUID = -1647718559236829109L;
32 |
33 | /**
34 | * Default constructor.
35 | */
36 | public NameTemplateException() {
37 | super();
38 | }
39 |
40 | /**
41 | * Class constructor
42 | *
43 | * @param s java.lang.String
44 | */
45 | public NameTemplateException(String s) {
46 | super(s);
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/server/filesys/DeviceAttribute.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2006-2010 Alfresco Software Limited.
3 | *
4 | * This file is part of Alfresco
5 | *
6 | * Alfresco is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Lesser General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * Alfresco is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public License
17 | * along with Alfresco. If not, see
Specifies the constants that can be used to set the DiskDeviceContext device attributes.
26 | *
27 | * @author gkspencer
28 | */
29 | public final class DeviceAttribute {
30 |
31 | // Device attributes
32 | public static final int Removable = 0x0001;
33 | public static final int ReadOnly = 0x0002;
34 | public static final int FloppyDisk = 0x0004;
35 | public static final int WriteOnce = 0x0008;
36 | public static final int Remote = 0x0010;
37 | public static final int Mounted = 0x0020;
38 | public static final int Virtual = 0x0040;
39 | }
40 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/server/filesys/DiskFullException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2006-2010 Alfresco Software Limited.
3 | *
4 | * This file is part of Alfresco
5 | *
6 | * Alfresco is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Lesser General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * Alfresco is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public License
17 | * along with Alfresco. If not, see
Thrown when a disk write or file extend will exceed the available disk quota for the shared filesystem.
26 | *
27 | * @author gkspencer
28 | */
29 | public class DiskFullException extends IOException {
30 |
31 | private static final long serialVersionUID = 1946175038087467669L;
32 |
33 | /**
34 | * Default constructor
35 | */
36 | public DiskFullException() {
37 | super();
38 | }
39 |
40 | /**
41 | * Class constructor
42 | *
43 | * @param msg String
44 | */
45 | public DiskFullException(String msg) {
46 | super(msg);
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/server/filesys/FileListener.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2006-2010 Alfresco Software Limited.
3 | *
4 | * This file is part of Alfresco
5 | *
6 | * Alfresco is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Lesser General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * Alfresco is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public License
17 | * along with Alfresco. If not, see
Generates events when files are opened/closed on the server.
28 | *
29 | * @author gkspencer
30 | */
31 | public interface FileListener {
32 |
33 | /**
34 | * File has been closed.
35 | *
36 | * @param sess SrvSession
37 | * @param file NetworkFile
38 | */
39 | void fileClosed(SrvSession sess, NetworkFile file);
40 |
41 | /**
42 | * File has been opened.
43 | *
44 | * @param sess SrvSession
45 | * @param file NetworkFile
46 | */
47 | void fileOpened(SrvSession sess, NetworkFile file);
48 | }
49 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/server/filesys/TooManySearchesException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2018 GK Spencer
3 | *
4 | * JFileServer is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU Lesser General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * JFileServer is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public License
15 | * along with JFileServer. If not, see
This error indicates that too many active searches are currently open
22 | * on a session/file. The new search request will be rejected by the server.
23 | *
24 | * @author gkspencer
25 | */
26 | public class TooManySearchesException extends Exception {
27 |
28 | private static final long serialVersionUID = 1L;
29 |
30 | /**
31 | * TooManyConnectionsException constructor.
32 | */
33 | public TooManySearchesException() {
34 | super();
35 | }
36 |
37 | /**
38 | * TooManyConnectionsException constructor.
39 | *
40 | * @param s String
41 | */
42 | public TooManySearchesException(String s) {
43 | super(s);
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/server/filesys/FileNameException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2006-2010 Alfresco Software Limited.
3 | *
4 | * This file is part of Alfresco
5 | *
6 | * Alfresco is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Lesser General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * Alfresco is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public License
17 | * along with Alfresco. If not, see
This ecxeption may be thrown when a file name is too long or contains invalid characters.
27 | *
28 | * @author gkspencer
29 | */
30 | public class FileNameException extends IOException {
31 |
32 | private static final long serialVersionUID = 2394682802933348980L;
33 |
34 | /**
35 | * Class constructor.
36 | */
37 | public FileNameException() {
38 | super();
39 | }
40 |
41 | /**
42 | * Class constructor.
43 | *
44 | * @param s java.lang.String
45 | */
46 | public FileNameException(String s) {
47 | super(s);
48 | }
49 |
50 | }
51 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/server/locking/FileLockingInterface.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2006-2010 Alfresco Software Limited.
3 | *
4 | * This file is part of Alfresco
5 | *
6 | * Alfresco is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Lesser General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * Alfresco is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public License
17 | * along with Alfresco. If not, see
Optional interface that a DiskInterface driver can implement to provide file locking support.
29 | *
30 | * @author gkspencer
31 | */
32 | public interface FileLockingInterface {
33 |
34 | /**
35 | * Return the lock manager implementation associated with this virtual filesystem
36 | *
37 | * @param sess SrvSession
38 | * @param tree TreeConnection
39 | * @return LockManager
40 | */
41 | public LockManager getLockManager(SrvSession sess, TreeConnection tree);
42 | }
43 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/server/filesys/NotifyAction.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2018 GK Spencer
3 | *
4 | * JFileServer is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU Lesser General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * JFileServer is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public License
15 | * along with JFileServer. If not, see
Indicates that a request could not be deferred for later processing, and and appropriate error
26 | * should be returned.
27 | *
28 | * @author gkspencer
29 | */
30 | public class DeferFailedException extends Exception {
31 |
32 | private static final long serialVersionUID = 1L;
33 |
34 | /**
35 | * Default constructor.
36 | */
37 | public DeferFailedException() {
38 | super();
39 | }
40 |
41 | /**
42 | * Class constructor.
43 | *
44 | * @param s String
45 | */
46 | public DeferFailedException(String s) {
47 | super(s);
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/server/config/ServerActiveException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2006-2010 Alfresco Software Limited.
3 | *
4 | * This file is part of Alfresco
5 | *
6 | * Alfresco is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Lesser General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * Alfresco is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public License
17 | * along with Alfresco. If not, see
This exception may be thrown when certain operations are performed on a server that
24 | * is currently in a running state.
25 | *
26 | * @author gkspencer
27 | */
28 | public class ServerActiveException extends Exception {
29 |
30 | private static final long serialVersionUID = 5705188958170354512L;
31 |
32 | /**
33 | * ServerActiveException constructor.
34 | */
35 | public ServerActiveException() {
36 | super();
37 | }
38 |
39 | /**
40 | * ServerActiveException constructor.
41 | *
42 | * @param s java.lang.String
43 | */
44 | public ServerActiveException(String s) {
45 | super(s);
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/server/filesys/clientapi/json/GetPathStatusResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2024 GK Spencer
3 | *
4 | * JFileServer is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU Lesser General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * JFileServer is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public License
15 | * along with JFileServer. If not, see Monitors the available NetBIOS LANAs for online/offline status as network interfaces are added
27 | * and removed Optional interface that a DiskInterface driver can implement to provide disk sizing information. The disk size
26 | * information may also be specified via the configuration.
27 | *
28 | * @author gkspencer
29 | */
30 | public interface DiskSizeInterface {
31 |
32 | /**
33 | * Get the disk information for this shared disk device.
34 | *
35 | * @param ctx DiskDeviceContext
36 | * @param diskDev SrvDiskInfo
37 | * @throws java.io.IOException The exception description.
38 | */
39 | public void getDiskInformation(DiskDeviceContext ctx, SrvDiskInfo diskDev)
40 | throws java.io.IOException;
41 | }
42 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/server/filesys/FileExistsException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2006-2010 Alfresco Software Limited.
3 | *
4 | * This file is part of Alfresco
5 | *
6 | * Alfresco is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Lesser General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * Alfresco is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public License
17 | * along with Alfresco. If not, see This exception may be thrown by a disk interface when an attempt to create a new file fails because
24 | * the file already exists.
25 | *
26 | * @author gkspencer
27 | */
28 | public class FileExistsException extends java.io.IOException {
29 |
30 | private static final long serialVersionUID = 6314398441511723019L;
31 |
32 | /**
33 | * FileExistsException constructor.
34 | */
35 | public FileExistsException() {
36 | super();
37 | }
38 |
39 | /**
40 | * FileExistsException constructor.
41 | *
42 | * @param s java.lang.String
43 | */
44 | public FileExistsException(String s) {
45 | super(s);
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/server/filesys/TooManyFilesException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2006-2010 Alfresco Software Limited.
3 | *
4 | * This file is part of Alfresco
5 | *
6 | * Alfresco is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Lesser General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * Alfresco is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public License
17 | * along with Alfresco. If not, see This error is generated when a tree connection has no free file slots. The new file open
24 | * request will be rejected by the server.
25 | *
26 | * @author gkspencer
27 | */
28 | public class TooManyFilesException extends Exception {
29 |
30 | private static final long serialVersionUID = -5947001587171843393L;
31 |
32 | /**
33 | * TooManyFilesException constructor.
34 | */
35 | public TooManyFilesException() {
36 | super();
37 | }
38 |
39 | /**
40 | * TooManyFilesException constructor.
41 | *
42 | * @param s java.lang.String
43 | */
44 | public TooManyFilesException(String s) {
45 | super(s);
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/server/filesys/UnsupportedInfoLevelException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2006-2010 Alfresco Software Limited.
3 | *
4 | * This file is part of Alfresco
5 | *
6 | * Alfresco is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Lesser General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * Alfresco is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public License
17 | * along with Alfresco. If not, see This error is generated when a request is made for an information level that is not currently
24 | * supported by the SMB server.
25 | *
26 | * @author gkspencer
27 | */
28 | public class UnsupportedInfoLevelException extends Exception {
29 |
30 | private static final long serialVersionUID = 7757616035566368034L;
31 |
32 | /**
33 | * Class constructor.
34 | */
35 | public UnsupportedInfoLevelException() {
36 | super();
37 | }
38 |
39 | /**
40 | * Class constructor.
41 | *
42 | * @param str java.lang.String
43 | */
44 | public UnsupportedInfoLevelException(String str) {
45 | super(str);
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/server/filesys/IOControlNotImplementedException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2006-2010 Alfresco Software Limited.
3 | *
4 | * This file is part of Alfresco
5 | *
6 | * Alfresco is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Lesser General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * Alfresco is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public License
17 | * along with Alfresco. If not, see This exception may be thrown by an IOCtlInterface implementation.
26 | *
27 | * @author gkspencer
28 | */
29 | public class IOControlNotImplementedException extends Exception {
30 |
31 | private static final long serialVersionUID = -3555727552298485187L;
32 |
33 | /**
34 | * Default constructor.
35 | */
36 | public IOControlNotImplementedException() {
37 | super();
38 | }
39 |
40 | /**
41 | * Class constructor.
42 | *
43 | * @param s java.lang.String
44 | */
45 | public IOControlNotImplementedException(String s) {
46 | super(s);
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/oncrpc/RpcPacketHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2006-2010 Alfresco Software Limited.
3 | *
4 | * This file is part of Alfresco
5 | *
6 | * Alfresco is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Lesser General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * Alfresco is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public License
17 | * along with Alfresco. If not, see Interface used by an RpcPacket to send a response RPC via either TCP or UDP.
28 | *
29 | * @author gkspencer
30 | */
31 | public interface RpcPacketHandler {
32 |
33 | /**
34 | * Read an RPC request/response
35 | *
36 | * @return RpcPacket
37 | * @exception IOException Socket error
38 | */
39 | public RpcPacket receiveRpc()
40 | throws IOException;
41 |
42 | /**
43 | * Send an RPC response
44 | *
45 | * @param rpc RpcPacket
46 | * @exception IOException Socket error
47 | */
48 | public void sendRpcResponse(RpcPacket rpc)
49 | throws IOException;
50 | }
51 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/server/filesys/cache/StateCacheException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2005-2013 Alfresco Software Limited.
3 | *
4 | * This file is part of Alfresco
5 | *
6 | * Alfresco is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Lesser General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * Alfresco is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public License
17 | * along with Alfresco. If not, see The UnsupportedDeviceTypeException is thrown when an attempt to connect to
26 | * a remote device that is not supported by the remote server.
27 | *
28 | * @author gkspencer
29 | */
30 | public class UnsupportedDeviceTypeException extends Exception {
31 |
32 | private static final long serialVersionUID = -8150979721279343472L;
33 |
34 | /**
35 | * Class constructor
36 | */
37 | public UnsupportedDeviceTypeException() {
38 | }
39 |
40 | /**
41 | * Class constructor
42 | *
43 | * @param msg String
44 | */
45 | public UnsupportedDeviceTypeException(String msg) {
46 | super(msg);
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/smb/dcerpc/Wkssvc.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2006-2010 Alfresco Software Limited.
3 | *
4 | * This file is part of Alfresco
5 | *
6 | * Alfresco is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Lesser General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * Alfresco is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public License
17 | * along with Alfresco. If not, see Contains constants for the workstation DCE/RPC service requests.
26 | *
27 | * @author gkspencer
28 | */
29 | public class Wkssvc {
30 |
31 | // Wkssvc opcodes
32 | public static final int NetWkstaGetInfo = 0x00;
33 |
34 | /**
35 | * Convert an opcode to a function name
36 | *
37 | * @param opCode int
38 | * @return String
39 | */
40 | public final static String getOpcodeName(int opCode) {
41 |
42 | String ret = "";
43 | switch (opCode) {
44 | case NetWkstaGetInfo:
45 | ret = "NetWkstaGetInfo";
46 | break;
47 | }
48 | return ret;
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/netbios/server/RemoteNameListener.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2006-2010 Alfresco Software Limited.
3 | *
4 | * This file is part of Alfresco
5 | *
6 | * Alfresco is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Lesser General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * Alfresco is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public License
17 | * along with Alfresco. If not, see Used to provide optional connection handlers to the main connection handler via dynamic class loading This exception may be thrown by a disk interface when the file data is not available due to the file being archived
26 | * or the repository being unavailable.
27 | *
28 | * @author gkspencer
29 | */
30 | public class FileOfflineException extends IOException {
31 |
32 | private static final long serialVersionUID = 5557665936715536725L;
33 |
34 | /**
35 | * Class constructor.
36 | */
37 | public FileOfflineException() {
38 | super();
39 | }
40 |
41 | /**
42 | * Class constructor.
43 | *
44 | * @param s java.lang.String
45 | */
46 | public FileOfflineException(String s) {
47 | super(s);
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/server/filesys/clientapi/json/ClientAPIResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2023 GK Spencer
3 | *
4 | * JFileServer is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU Lesser General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * JFileServer is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public License
15 | * along with JFileServer. If not, see Indicates that the upper part of a path does not exist, as opposed to the file/folder at the
28 | * end of the path.
29 | *
30 | * @author gkspencer
31 | */
32 | public class PathNotFoundException extends IOException {
33 |
34 | private static final long serialVersionUID = -537450129331293825L;
35 |
36 | /**
37 | * Class constructor.
38 | */
39 | public PathNotFoundException() {
40 | super();
41 | }
42 |
43 | /**
44 | * Class constructor.
45 | *
46 | * @param s java.lang.String
47 | */
48 | public PathNotFoundException(String s) {
49 | super(s);
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/smb/InvalidUNCPathException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2006-2010 Alfresco Software Limited.
3 | *
4 | * This file is part of Alfresco
5 | *
6 | * Alfresco is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Lesser General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * Alfresco is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public License
17 | * along with Alfresco. If not, see The InvalidUNCPathException indicates that a UNC path has an invalid format.
26 | *
27 | * @author gkspencer
28 | * @see PCShare
29 | */
30 | public class InvalidUNCPathException extends Exception {
31 |
32 | private static final long serialVersionUID = -5286647687687183134L;
33 |
34 | /**
35 | * Default invalid UNC path exception constructor.
36 | */
37 |
38 | public InvalidUNCPathException() {
39 | }
40 |
41 | /**
42 | * Invalid UNC path exception constructor, with additional details string.
43 | *
44 | * @param msg String
45 | */
46 |
47 | public InvalidUNCPathException(String msg) {
48 | super(msg);
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/server/filesys/DiskOfflineException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2006-2010 Alfresco Software Limited.
3 | *
4 | * This file is part of Alfresco
5 | *
6 | * Alfresco is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Lesser General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * Alfresco is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public License
17 | * along with Alfresco. If not, see This exception may be thrown by a disk interface when the filesystem is offline data is not available due to the file being archived
26 | * or the repository being unavailable.
27 | *
28 | * @author gkspencer
29 | */
30 | public class DiskOfflineException extends IOException {
31 |
32 | private static final long serialVersionUID = -3055330216300723042L;
33 |
34 | /**
35 | * Class constructor.
36 | */
37 | public DiskOfflineException() {
38 | super();
39 | }
40 |
41 | /**
42 | * Class constructor.
43 | *
44 | * @param s java.lang.String
45 | */
46 | public DiskOfflineException(String s) {
47 | super(s);
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/server/filesys/FilesystemPendingException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2006-2010 Alfresco Software Limited.
3 | *
4 | * This file is part of Alfresco
5 | *
6 | * Alfresco is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Lesser General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * Alfresco is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public License
17 | * along with Alfresco. If not, see Used to indicate that an SMB/CIFS request will be dealt with by the filesystem driver out of sequence.
28 | *
29 | * @author gkspencer
30 | */
31 | public class FilesystemPendingException extends IOException {
32 |
33 | private static final long serialVersionUID = -6262965537099562665L;
34 |
35 | /**
36 | * Default constructor
37 | */
38 | public FilesystemPendingException() {
39 | super();
40 | }
41 |
42 | /**
43 | * Class constructor
44 | *
45 | * @param msg String
46 | */
47 | public FilesystemPendingException(String msg) {
48 | super(msg);
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/smb/dcerpc/LsaRpc.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2023 GK Spencer
3 | *
4 | * JFileServer is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU Lesser General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * JFileServer is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public License
15 | * along with JFileServer. If not, see Contains constants for the local security authority DCE/RPC service requests.
24 | *
25 | * @author gkspencer
26 | */
27 | public class LsaRpc {
28 |
29 | // LsaRpc opcodes
30 | public static final int DsRoleGetPrimaryDomainInformation = 0x00;
31 |
32 | /**
33 | * Convert an opcode to a function name
34 | *
35 | * @param opCode int
36 | * @return String
37 | */
38 | public final static String getOpcodeName(int opCode) {
39 |
40 | String ret = "";
41 | switch (opCode) {
42 | case DsRoleGetPrimaryDomainInformation:
43 | ret = "DsRoleGetPrimaryDomainInformation";
44 | break;
45 | }
46 |
47 | return ret;
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/server/filesys/cache/FileStateListener.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2006-2010 Alfresco Software Limited.
3 | *
4 | * This file is part of Alfresco
5 | *
6 | * Alfresco is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Lesser General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * Alfresco is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public License
17 | * along with Alfresco. If not, see This error indicates that too many tree connections are currently open
24 | * on a session. The new tree connection request will be rejected by the server.
25 | *
26 | * @author gkspencer
27 | */
28 | public class TooManyConnectionsException extends Exception {
29 |
30 | private static final long serialVersionUID = 6353813221614206049L;
31 |
32 | /**
33 | * TooManyConnectionsException constructor.
34 | */
35 | public TooManyConnectionsException() {
36 | super();
37 | }
38 |
39 | /**
40 | * TooManyConnectionsException constructor.
41 | *
42 | * @param s java.lang.String
43 | */
44 | public TooManyConnectionsException(String s) {
45 | super(s);
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/smb/server/KeyType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2018 GK Spencer
3 | *
4 | * JFileServer is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU Lesser General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * JFileServer is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public License
15 | * along with JFileServer. If not, see Format various file date/time values Indicates that the processing of a file server request has been deferred whilst other processing
28 | * is done, and the request packet should not be released.
29 | *
30 | * @author gkspencer
31 | */
32 | public class DeferredPacketException extends IOException {
33 |
34 | private static final long serialVersionUID = 1L;
35 |
36 | /**
37 | * Default constructor.
38 | */
39 | public DeferredPacketException() {
40 | super();
41 | }
42 |
43 | /**
44 | * Class constructor.
45 | *
46 | * @param s String
47 | */
48 | public DeferredPacketException(String s) {
49 | super(s);
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/server/filesys/cache/LocalFileStateProxy.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2006-2011 Alfresco Software Limited.
3 | *
4 | * This file is part of Alfresco
5 | *
6 | * Alfresco is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Lesser General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * Alfresco is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public License
17 | * along with Alfresco. If not, see The file state cache only stores file states locally so the actual file state can
26 | * be accessed directly.
27 | *
28 | * @author gkspencer
29 | */
30 | public class LocalFileStateProxy implements FileStateProxy {
31 |
32 | // Reference the file state
33 | private FileState m_state;
34 |
35 | /**
36 | * Class constructor
37 | *
38 | * @param fstate FileState
39 | */
40 | public LocalFileStateProxy(FileState fstate) {
41 | m_state = fstate;
42 | }
43 |
44 | /**
45 | * Return the file state
46 | *
47 | * @return FileState
48 | */
49 | public FileState getFileState() {
50 | return m_state;
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/server/filesys/db/DBException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2006-2010 Alfresco Software Limited.
3 | *
4 | * This file is part of Alfresco
5 | *
6 | * Alfresco is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Lesser General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * Alfresco is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public License
17 | * along with Alfresco. If not, see Holds the version strings for various server implementations.
27 | *
28 | * @author gkspencer
29 | */
30 | public class Version {
31 |
32 | // Top level version
33 | public static String ReleaseVersion = "1.3.0";
34 |
35 | // Server version strings
36 | public static String SMBServerVersion = ReleaseVersion;
37 | public static String NetBIOSServerVersion = ReleaseVersion;
38 |
39 | public static String NFSServerVersion = ReleaseVersion;
40 | public static String MountServerVersion = ReleaseVersion;
41 | public static String PortMapServerVersion = ReleaseVersion;
42 |
43 | public static String FTPServerVersion = ReleaseVersion;
44 | }
45 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/smb/dcerpc/DCEReadable.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2006-2010 Alfresco Software Limited.
3 | *
4 | * This file is part of Alfresco
5 | *
6 | * Alfresco is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Lesser General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * Alfresco is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public License
17 | * along with Alfresco. If not, see A class that implements the DCEReadable interface can load itself from a DCE buffer.
26 | *
27 | * @author gkspencer
28 | */
29 | public interface DCEReadable {
30 |
31 | /**
32 | * Read the object state from the DCE/RPC buffer
33 | *
34 | * @param buf DCEBuffer
35 | * @exception DCEBufferException DCE buffer error
36 | */
37 | public void readObject(DCEBuffer buf)
38 | throws DCEBufferException;
39 |
40 | /**
41 | * Read the strings for object from the DCE/RPC buffer
42 | *
43 | * @param buf DCEBuffer
44 | * @exception DCEBufferException DCE buffer error
45 | */
46 | public void readStrings(DCEBuffer buf)
47 | throws DCEBufferException;
48 | }
49 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/server/filesys/ExistingOpLockOwnerException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2023 GK Spencer
3 | *
4 | * JFileServer is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU Lesser General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * JFileServer is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public License
15 | * along with JFileServer. If not, see The server listener allows external components to receive notification of server startup, shutdown and
26 | * error events.
27 | *
28 | * @author gkspencer
29 | */
30 | public interface ServerListener {
31 |
32 | // Server event types
33 |
34 | public static final int ServerStartup = 0;
35 | public static final int ServerActive = 1;
36 | public static final int ServerShutdown = 2;
37 | public static final int ServerError = 3;
38 |
39 | public static final int ServerCustomEvent = 100;
40 |
41 | /**
42 | * Receive a server event notification
43 | *
44 | * @param server NetworkServer
45 | * @param event int
46 | */
47 | public void serverStatusEvent(NetworkServer server, int event);
48 | }
49 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/server/filesys/FileIdInterface.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2006-2010 Alfresco Software Limited.
3 | *
4 | * This file is part of Alfresco
5 | *
6 | * Alfresco is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Lesser General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * Alfresco is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public License
17 | * along with Alfresco. If not, see Optional interface that a DiskInterface driver can implement to provide file id to path conversion.
31 | *
32 | * @author gkspencer
33 | */
34 | public interface FileIdInterface {
35 |
36 | /**
37 | * Convert a file id to a share relative path
38 | *
39 | * @param sess SrvSession
40 | * @param tree TreeConnection
41 | * @param dirid int
42 | * @param fileid int
43 | * @return String
44 | * @throws FileNotFoundException File not found
45 | */
46 | public String buildPathForFileId(SrvSession sess, TreeConnection tree, int dirid, int fileid)
47 | throws FileNotFoundException;
48 | }
49 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/server/filesys/ShareListener.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2006-2010 Alfresco Software Limited.
3 | *
4 | * This file is part of Alfresco
5 | *
6 | * Alfresco is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Lesser General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * Alfresco is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public License
17 | * along with Alfresco. If not, see The share listener interface provides a hook into the server so that an application is notified when
26 | * a session connects/disconnects from a particular share.
27 | *
28 | * @author gkspencer
29 | */
30 | public interface ShareListener {
31 |
32 | /**
33 | * Called when a session connects to a share
34 | *
35 | * @param sess SrvSession
36 | * @param tree TreeConnection
37 | */
38 | public void shareConnect(SrvSession sess, TreeConnection tree);
39 |
40 | /**
41 | * Called when a session disconnects from a share
42 | *
43 | * @param sess SrvSession
44 | * @param tree TreeConnection
45 | */
46 | public void shareDisconnect(SrvSession sess, TreeConnection tree);
47 | }
48 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/server/auth/TransactionalSMBAuthenticator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2018 GK Spencer
3 | *
4 | * JFileServer is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU Lesser General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * JFileServer is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public License
15 | * along with JFileServer. If not, see Used by the SMB authenticator when the authentication processing needs to be wrapped in a transaction Output debug messages to the console stream, System.out.
26 | *
27 | * @author gkspencer
28 | */
29 | public class ConsoleDebug extends DebugInterfaceBase {
30 |
31 | /**
32 | * Output a debug string with a specific logging level
33 | *
34 | * @param str String
35 | * @param level int
36 | */
37 | public void debugPrint(String str, int level) {
38 | if (level <= getLogLevel())
39 | System.out.print(str);
40 | }
41 |
42 | /**
43 | * Output a debug string, and a newline, with a specific logging level
44 | *
45 | * @param str String
46 | */
47 | public void debugPrintln(String str, int level) {
48 | if (level <= getLogLevel())
49 | System.out.println(str);
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/oncrpc/nfs/RpcSessionProcessor.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020 GK Spencer
3 | *
4 | * JFileServer is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU Lesser General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * JFileServer is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public License
15 | * along with JFileServer. If not, see The UnknownLocalDomainException is thrown when the local domain name cannot be determined,
26 | * this may be due to the local node not actually running a Windows networking/SMB server.
27 | *
28 | * @author gkspencer
29 | */
30 | public class UnknownLocalDomainException extends Exception {
31 |
32 | private static final long serialVersionUID = 87619071488565868L;
33 |
34 | /**
35 | * UnknownLocalDomainException constructor comment.
36 | */
37 | public UnknownLocalDomainException() {
38 | super();
39 | }
40 |
41 | /**
42 | * UnknownLocalDomainException constructor comment.
43 | *
44 | * @param s String
45 | */
46 | public UnknownLocalDomainException(String s) {
47 | super(s);
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/server/filesys/MediaOfflineException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2006-2010 Alfresco Software Limited.
3 | *
4 | * This file is part of Alfresco
5 | *
6 | * Alfresco is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Lesser General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * Alfresco is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public License
17 | * along with Alfresco. If not, see This exception may be thrown by a disk interface when a file/folder is not available due to the storage media
28 | * being offline, repository being unavailable, database unavailable or inaccessible or similar condition.
29 | *
30 | * @author gkspencer
31 | */
32 | public class MediaOfflineException extends IOException {
33 |
34 | private static final long serialVersionUID = 4352299042037000997L;
35 |
36 | /**
37 | * Class constructor.
38 | */
39 | public MediaOfflineException() {
40 | super();
41 | }
42 |
43 | /**
44 | * Class constructor.
45 | *
46 | * @param s java.lang.String
47 | */
48 | public MediaOfflineException(String s) {
49 | super(s);
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/server/core/InvalidDeviceInterfaceException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2006-2010 Alfresco Software Limited.
3 | *
4 | * This file is part of Alfresco
5 | *
6 | * Alfresco is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Lesser General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * Alfresco is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public License
17 | * along with Alfresco. If not, see This exception may be thrown by a SharedDevice when the device interface has not been specified,
24 | * the device interface does not match the shared device type, or the device interface driver class
25 | * cannot be loaded.
26 | *
27 | * @author gkspencer
28 | */
29 | public class InvalidDeviceInterfaceException extends Exception {
30 |
31 | private static final long serialVersionUID = -3497495092231515500L;
32 |
33 | /**
34 | * InvalidDeviceInterfaceException constructor.
35 | */
36 | public InvalidDeviceInterfaceException() {
37 | super();
38 | }
39 |
40 | /**
41 | * InvalidDeviceInterfaceException constructor.
42 | *
43 | * @param s java.lang.String
44 | */
45 | public InvalidDeviceInterfaceException(String s) {
46 | super(s);
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/server/SessionHandlerInterface.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2006-2010 Alfresco Software Limited.
3 | *
4 | * This file is part of Alfresco
5 | *
6 | * Alfresco is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Lesser General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * Alfresco is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public License
17 | * along with Alfresco. If not, see Implemented by classes that wait for an incoming session request.
28 | *
29 | * @author gkspencer
30 | */
31 | public interface SessionHandlerInterface {
32 |
33 | /**
34 | * Return the protocol name
35 | *
36 | * @return String
37 | */
38 | public String getHandlerName();
39 |
40 | /**
41 | * Initialize the session handler
42 | *
43 | * @param server NetworkServer
44 | * @exception IOException Socket error
45 | */
46 | public void initializeSessionHandler(NetworkServer server)
47 | throws IOException;
48 |
49 | /**
50 | * Close the session handler
51 | *
52 | * @param server NetworkServer
53 | */
54 | public void closeSessionHandler(NetworkServer server);
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/server/auth/ntlm/StringTargetInfo.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2018 GK Spencer
3 | *
4 | * JFileServer is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU Lesser General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * JFileServer is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public License
15 | * along with JFileServer. If not, see Optional interface that a filesystem driver can implement to be called back after the protocol layer has sent a file
29 | * close response to the client to do more work.
30 | *
31 | * @author gkspencer
32 | */
33 | public interface PostCloseProcessor {
34 |
35 | /**
36 | * Post close the file.
37 | *
38 | * @param sess Server session
39 | * @param tree Tree connection.
40 | * @param netFile Network file context.
41 | * @throws IOException If an error occurs.
42 | */
43 | public void postCloseFile(SrvSession sess, TreeConnection tree, NetworkFile netFile)
44 | throws IOException;
45 | }
46 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/smb/dcerpc/DCEWriteable.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2006-2010 Alfresco Software Limited.
3 | *
4 | * This file is part of Alfresco
5 | *
6 | * Alfresco is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Lesser General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * Alfresco is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public License
17 | * along with Alfresco. If not, see A class that implements the DCEWriteable interface can save itself to a DCE buffer.
26 | *
27 | * @author gkspencer
28 | */
29 | public interface DCEWriteable {
30 |
31 | /**
32 | * Write the object state to DCE/RPC buffers.
33 | *
34 | * If a list of objects is being written the strings will be written after the objects so the
35 | * second buffer will be specified.
36 | *
37 | * If a single object is being written to the buffer the second buffer may be null or be the same
38 | * buffer as the main buffer.
39 | *
40 | * @param buf DCEBuffer
41 | * @param strBuf DCEBuffer
42 | * @exception DCEBufferException DCE buffer error
43 | */
44 | public void writeObject(DCEBuffer buf, DCEBuffer strBuf)
45 | throws DCEBufferException;
46 | }
47 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/server/config/IncompleteConfigurationException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2006-2010 Alfresco Software Limited.
3 | *
4 | * This file is part of Alfresco
5 | *
6 | * Alfresco is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Lesser General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * Alfresco is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public License
17 | * along with Alfresco. If not, see Indicates that the server configuration is incomplete, and the server cannot be started.
24 | *
25 | * The server name, domain name and network broadcast mask are the minimum parameters that must be specified
26 | * for a server configuration.
27 | *
28 | * @author gkspencer
29 | */
30 | public class IncompleteConfigurationException extends Exception {
31 |
32 | private static final long serialVersionUID = 6805142016306543355L;
33 |
34 | /**
35 | * IncompleteConfigurationException constructor.
36 | */
37 | public IncompleteConfigurationException() {
38 | super();
39 | }
40 |
41 | /**
42 | * IncompleteConfigurationException constructor.
43 | *
44 | * @param s java.lang.String
45 | */
46 | public IncompleteConfigurationException(String s) {
47 | super(s);
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/server/filesys/clientapi/ClientAPI.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2023 GK Spencer
3 | *
4 | * JFileServer is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU Lesser General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * JFileServer is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public License
15 | * along with JFileServer. If not, see Optional interface that a DiskInterface driver can implement to provide a client callable API where the
27 | * requests/responses are tunnelled over an existing protocol connection.
28 | *
29 | * @author gkspencer
30 | */
31 | public interface ClientAPI {
32 |
33 | /**
34 | * Check if the client API interface is enabled
35 | *
36 | * @return boolean
37 | */
38 | public boolean isClientAPIEnabled();
39 |
40 | /**
41 | * Return the client API implementation associated with this virtual filesystem
42 | *
43 | * @param sess SrvSession
44 | * @param tree TreeConnection
45 | * @return ClientAPIInterface
46 | */
47 | public ClientAPIInterface getClientAPI(SrvSession> sess, TreeConnection tree);
48 | }
49 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/util/win32/Kernel32Ex.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2018 GK Spencer
3 | *
4 | * JFileServer is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU Lesser General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * JFileServer is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public License
15 | * along with JFileServer. If not, see
24 | * Thrown when a device context parameter string is invalid.
25 | *
26 | * @author gkspencer
27 | */
28 | public class DeviceContextException extends Exception {
29 |
30 | private static final long serialVersionUID = -2282554065425234959L;
31 |
32 | /**
33 | * Class constructor
34 | */
35 | public DeviceContextException() {
36 | super();
37 | }
38 |
39 | /**
40 | * Class constructor
41 | *
42 | * @param s java.lang.String
43 | */
44 | public DeviceContextException(String s) {
45 | super(s);
46 | }
47 |
48 | /**
49 | * Class constructor
50 | *
51 | * @param s java.lang.String
52 | * @param cause Throwable
53 | */
54 | public DeviceContextException(String s, Throwable cause) {
55 | super(s, cause);
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/locking/NotLockedException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2006-2010 Alfresco Software Limited.
3 | *
4 | * This file is part of Alfresco
5 | *
6 | * Alfresco is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Lesser General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * Alfresco is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public License
17 | * along with Alfresco. If not, see Thrown when an unlock request is received that has not active lock on a file.
28 | *
29 | * @author gkspencer
30 | */
31 | public class NotLockedException extends IOException {
32 |
33 | private static final long serialVersionUID = -2370461108879779406L;
34 |
35 | /**
36 | * Class constructor.
37 | */
38 | public NotLockedException() {
39 | super();
40 | }
41 |
42 | /**
43 | * Class constructor.
44 | *
45 | * @param s String
46 | */
47 | public NotLockedException(String s) {
48 | super(s);
49 | }
50 |
51 | /**
52 | * Class constructor.
53 | *
54 | * @param s String
55 | * @param ex Throwable
56 | */
57 | public NotLockedException(String s, Throwable ex) {
58 | super(s, ex);
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/src/main/java/org/filesys/locking/LockConflictException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2006-2010 Alfresco Software Limited.
3 | *
4 | * This file is part of Alfresco
5 | *
6 | * Alfresco is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Lesser General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * Alfresco is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public License
17 | * along with Alfresco. If not, see Thrown when a lock request overlaps with an existing lock on a file.
28 | *
29 | * @author gkspencer
30 | */
31 | public class LockConflictException extends IOException {
32 |
33 | private static final long serialVersionUID = 8287539855625316026L;
34 |
35 | /**
36 | * Class constructor.
37 | */
38 | public LockConflictException() {
39 | super();
40 | }
41 |
42 | /**
43 | * Class constructor.
44 | *
45 | * @param s String
46 | */
47 | public LockConflictException(String s) {
48 | super(s);
49 | }
50 |
51 | /**
52 | * Class constructor.
53 | *
54 | * @param s String
55 | * @param ex Throwable
56 | */
57 | public LockConflictException(String s, Throwable ex) {
58 | super(s, ex);
59 | }
60 | }
61 |
--------------------------------------------------------------------------------