[jcifs] Fwd: SmbRandomAccessFile for read-only access

Michael B Allen ioplex at gmail.com
Mon Jul 1 12:15:56 MDT 2013

On Fri, Jun 21, 2013 at 10:31 AM, Somnath Kundu <skundu07 at gmail.com> wrote:
> On Fri, Jun 21, 2013 at 9:42 AM, Michael B Allen <ioplex at gmail.com> wrote:
>> Hi Somnath,
>> I would be shocked if you found a server that does not hasCapability
>> CAP_NT_SMBS. Maybe an ancient version of Samba thats actually a honeypot.
> I was testing with a shared HDD attached to a Asus RT-N13U router.
> IMHO, it is preferable not to assume anything about the capability of the
> underlying hardware/software when writing our code to make it work under any
> conditions.

Hi Somnath,

The SmbComOpenAndX code is based on analyzing communication of clients
that are so old I no longer have access to them (I think I would have
to resurrect Windows 98 somewhere). It is very possible that an
adjustment to the open flags is all that is necessary to get
SmbRandomAccessFile to work. But I would have to actually try it
myself. I cannot blindly apply a patch without high confidence that it
is correct. And an obscure router that doesn't implement commands that
have been standard for 20 years makes this a very low priority issue.
Never-the-less, I have added your diagnosis to the TODO list. It is at
least noteworthy that there is actually a device out there that does
not implement NT SMBs.


Michael B Allen
Java Active Directory Integration

More information about the jCIFS mailing list