[jcifs] NTSTATUS codes in jCIFS

Michael B. Allen miallen at eskimo.com
Sat Feb 8 09:32:41 EST 2003


Just fooling around I enabled NT_STATUS codes in jCIFS by added the
FLAGS2_STATUS32 bit in SmbTransport.java:

 92         int flags2 = Config.getInt( "jcifs.smb.client.flags2",
 93                 ServerMessageBlock.FLAGS2_LONG_FILENAMES |
 94                 ServerMessageBlock.FLAGS2_STATUS32 |
 95                 ServerMessageBlock.FLAGS2_UNICODE );

Of course any error returned will not be reported properly because we
have dos errrors littered throughout the code but you can see the first
error in Ethereal correctly.

However if you look at the attached packet capture of a list() operation
on NT 4 strangly it returns a dos error anyway. All headers up to the
point of failure indicate that NT_STATUS codes were accepted. If I use
a bad password, same thing, the error in SMB_COM_SESION_SETUP_ANDX is
a doserror.

Have you ever played with this? It's not easy to tell what is different
about jCIFS from say newish versions of smbclient that is preventing
status codes from being returned although as you can see there are
differences.

Any idea what's happening?

Mike

-- 
A  program should be written to model the concepts of the task it
performs rather than the physical world or a process because this
maximizes  the  potential  for it to be applied to tasks that are
conceptually  similar and, more important, to tasks that have not
yet been conceived. 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: NtStatusList.pcap
Type: application/octet-stream
Size: 1963 bytes
Desc: not available
Url : http://lists.samba.org/archive/jcifs/attachments/20030207/97e51fe6/NtStatusList.obj


More information about the jcifs mailing list