Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 33 for SmbException (0.07 sec)

  1. src/main/java/jcifs/SmbException.java

         */
        public SmbException(String message, int errorCode, Category category) {
            this(message, errorCode, Severity.PERMANENT, category);
        }
    
        /**
         * Adds context information to the exception
         *
         * @param key the context key
         * @param value the context value
         * @return this exception for chaining
         */
        public SmbException withContext(String key, Object value) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 6.4K bytes
    - Viewed (0)
  2. src/main/java/jcifs/util/ServerResponseValidator.java

         * @param maxSize maximum allowed size
         * @throws SmbException if validation fails
         */
        public void validateBuffer(byte[] buffer, int expectedSize, int maxSize) throws SmbException {
            totalValidations.incrementAndGet();
    
            if (buffer == null) {
                failedValidations.incrementAndGet();
                throw new SmbException("Response buffer is null");
            }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 16.6K bytes
    - Viewed (0)
  3. src/test/java/jcifs/util/PathValidatorTest.java

        }
    
        @Test
        public void testDirectoryTraversal() throws Exception {
            assertThrows(SmbException.class, () -> {
                validator.validatePath("\\share\\..\\..\\windows\\system32");
            });
        }
    
        @Test
        public void testDirectoryTraversalDot() throws Exception {
            assertThrows(SmbException.class, () -> {
                validator.validatePath("\\share\\.\\..\\folder");
            });
        }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 14.6K bytes
    - Viewed (0)
  4. src/main/java/jcifs/smb/SmbTreeHandleImpl.java

                return transport.getRemoteHostName();
            }
        }
    
        /**
         * {@inheritDoc}
         *
         * @throws SmbException
         *
         * @see jcifs.SmbTreeHandle#getServerTimeZoneOffset()
         */
        @Override
        public long getServerTimeZoneOffset() throws SmbException {
            try (SmbSessionImpl session = this.treeConnection.getSession(); SmbTransportImpl transport = session.getTransport()) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 11.1K bytes
    - Viewed (0)
  5. src/test/java/jcifs/util/ServerResponseValidatorTest.java

            } catch (SmbException e) {
                // Ignore
            }
    
            try {
                validator.validateBuffer(null, 50, 200); // Will fail
            } catch (SmbException e) {
                // Expected
            }
    
            try {
                validator.safeAdd(Integer.MAX_VALUE, 1); // Will fail
            } catch (SmbException e) {
                // Expected
            }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 14.2K bytes
    - Viewed (0)
  6. src/main/java/jcifs/smb/SmbFile.java

            if (this.fileLocator.isRootOrShare()) {
                throw new SmbException("Invalid operation for workgroups, servers, or shares");
            }
    
            try {
                setPathInformation(0, 0L, 0L, time);
            } catch (final CIFSException e) {
                throw SmbException.wrap(e);
            }
        }
    
        @Override
        public int getAttributes() throws SmbException {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 103.2K bytes
    - Viewed (0)
  7. src/main/java/jcifs/smb/SmbFileDirectoryLeasingExtension.java

         * @return array of SmbFile objects representing the directory contents
         * @throws SmbException if an error occurs
         */
        public static SmbFile[] listFilesWithLeasing(SmbFile smbFile) throws SmbException {
            if (!smbFile.isDirectory()) {
                throw new SmbException("Not a directory: " + smbFile.getPath());
            }
    
            try (SmbTreeHandleImpl th = smbFile.ensureTreeConnected()) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 23 02:21:31 UTC 2025
    - 7.1K bytes
    - Viewed (0)
  8. src/main/java/jcifs/util/PathValidator.java

         * @throws SmbException if path is invalid or dangerous
         */
        public String validatePath(String path) throws SmbException {
            if (path == null || path.isEmpty()) {
                throw new SmbException("Path cannot be null or empty");
            }
    
            // Check length
            if (path.length() > maxPathLength) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 14.5K bytes
    - Viewed (0)
  9. src/main/java/jcifs/smb/SmbTreeImpl.java

         * @param transport
         * @return
         * @throws SmbException
         */
        private int waitForState(final SmbTransportImpl transport) throws SmbException {
            int cs;
            while ((cs = this.connectionState.get()) != 0) {
                if (cs == 2) {
                    return cs;
                }
                if (cs == 3) {
                    throw new SmbException("Disconnecting during tree connect");
                }
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 30K bytes
    - Viewed (0)
  10. src/main/java/jcifs/smb1/smb1/SmbFile.java

         *
         * @throws SmbException if an error occurs while deleting the file or directory
         */
        public void delete() throws SmbException {
            exists();
            getUncPath0();
            delete(unc);
        }
    
        void delete(final String fileName) throws SmbException {
            if (getUncPath0().length() == 1) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 112.2K bytes
    - Viewed (0)
Back to top