From: Felix Schumacher Date: Mon, 9 Mar 2009 06:34:16 +0000 (+0100) Subject: jcifs-1.3.4 from tgz X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=4e645a80fde97fff395c3e32e841981986367563;p=jcifs_without_docs.git jcifs-1.3.4 from tgz Sun Mar 9 11:46:15 EDT 2009 jcifs-1.3.4 JCIFS 1.3.3 was accidentally compiled with Java 1.5. This release has been compiled with Java 1.4. Note that NTLMv2 still requires Java 1.5 update 7 for RC4. SMB parameter words were not decoded correctly (which were ultimately related to the fact that the WordCount of the SMB_COM_NT_CREATE_ANDX response is wrong because an extra 16 bytes for "offline files / client side caching (CSC)". Ultimately this caused an error with the SMB_COM_TREE_CONNECT_ANDX response of certain IBM clusters. This should now be fixed. The status codes and text for NT_STATUS_INVALID_COMPUTER_NAME (0xC0000122) and NT_STATUS_NO_TRUST_SAM_ACCOUNT (0xC000018B) have been added. Server capabilities in the SMB_COM_NEGOTIATE response were not being read correctly. This issue has been fixed. The documentation regarding the return value of renameTo has been fixed. --- diff --git a/README.txt b/README.txt index d971dd5..fbce788 100644 --- a/README.txt +++ b/README.txt @@ -1,5 +1,9 @@ -Sun Feb 22 15:14:55 EST 2009 -jcifs-1.3.4b +Sun Mar 9 11:46:15 EDT 2009 +jcifs-1.3.4 + +JCIFS 1.3.3 was accidentally compiled with Java 1.5. This release has +been compiled with Java 1.4. Note that NTLMv2 still requires Java 1.5 +update 7 for RC4. SMB parameter words were not decoded correctly (which were ultimately related to the fact that the WordCount of the SMB_COM_NT_CREATE_ANDX @@ -8,10 +12,13 @@ client side caching (CSC)". Ultimately this caused an error with the SMB_COM_TREE_CONNECT_ANDX response of certain IBM clusters. This should now be fixed. -The error code for 0xC000018B has been updated. +The status codes and text for NT_STATUS_INVALID_COMPUTER_NAME (0xC0000122) +and NT_STATUS_NO_TRUST_SAM_ACCOUNT (0xC000018B) have been added. Server capabilities in the SMB_COM_NEGOTIATE response were not being -read correctly. +read correctly. This issue has been fixed. + +The documentation regarding the return value of renameTo has been fixed. Sun Jan 25 14:31:31 EST 2009 jcifs-1.3.3 diff --git a/build.xml b/build.xml index ddff5bf..967250b 100644 --- a/build.xml +++ b/build.xml @@ -1,7 +1,7 @@ - - + + diff --git a/src/jcifs/smb/NtStatus.java b/src/jcifs/smb/NtStatus.java index 0c93666..cf9594e 100644 --- a/src/jcifs/smb/NtStatus.java +++ b/src/jcifs/smb/NtStatus.java @@ -74,6 +74,7 @@ public interface NtStatus { public static final int NT_STATUS_NO_SUCH_DOMAIN = 0xC00000df; public static final int NT_STATUS_NOT_A_DIRECTORY = 0xC0000103; public static final int NT_STATUS_CANNOT_DELETE = 0xC0000121; + public static final int NT_STATUS_INVALID_COMPUTER_NAME = 0xC0000122; public static final int NT_STATUS_PIPE_BROKEN = 0xC000014b; public static final int NT_STATUS_NO_SUCH_ALIAS = 0xC0000151; public static final int NT_STATUS_LOGON_TYPE_NOT_GRANTED = 0xC000015b; @@ -136,6 +137,7 @@ public interface NtStatus { NT_STATUS_NO_SUCH_DOMAIN, NT_STATUS_NOT_A_DIRECTORY, NT_STATUS_CANNOT_DELETE, + NT_STATUS_INVALID_COMPUTER_NAME, NT_STATUS_PIPE_BROKEN, NT_STATUS_NO_SUCH_ALIAS, NT_STATUS_LOGON_TYPE_NOT_GRANTED, @@ -199,6 +201,7 @@ public interface NtStatus { "The specified domain did not exist.", "The directory name is invalid.", "Access is denied.", + "The format of the specified computer name is invalid.", "The pipe has been ended.", "The specified local group does not exist.", "Logon failure: the user has not been granted the requested logon type at this computer.", diff --git a/src/jcifs/smb/SID.java b/src/jcifs/smb/SID.java index c68875e..76cf5a0 100644 --- a/src/jcifs/smb/SID.java +++ b/src/jcifs/smb/SID.java @@ -242,6 +242,19 @@ public class SID extends rpc.sid_t { } } } + public static byte[] toByteArray(rpc.sid_t sid) { + byte[] dst = new byte[1 + 1 + 6 + sid.sub_authority_count * 4]; + int di = 0; + dst[di++] = sid.revision; + dst[di++] = sid.sub_authority_count; + System.arraycopy(sid.identifier_authority, 0, dst, di, 6); + di += 6; + for (int ii = 0; ii < sid.sub_authority_count; ii++) { + jcifs.util.Encdec.enc_uint32le(sid.sub_authority[ii], dst, di); + di += 4; + } + return dst; + } int type; String domainName = null; diff --git a/src/jcifs/smb/SmbFile.java b/src/jcifs/smb/SmbFile.java index 5d4d4a8..9e0480f 100644 --- a/src/jcifs/smb/SmbFile.java +++ b/src/jcifs/smb/SmbFile.java @@ -129,8 +129,7 @@ import java.util.Date; * smb://workgroup/ lists servers, the smb:// * URL lists all available workgroups on a netbios LAN. Again, * in this context many methods are not valid and return default - * values(e.g. isHidden and renameTo will always - * return false). + * values(e.g. isHidden will always return false). * * * smb://angus.foo.net/d/jcifs/pipes.doc @@ -1993,7 +1992,6 @@ if (this instanceof SmbNamedPipe) { * new SmbFile. * * @param dest An SmbFile that represents the new pathname - * @return true if the file or directory was successfully renamed * @throws NullPointerException * If the dest argument is null */