Discussion:
[jcifs] Query regarding the SMB support
Vir Vekaria
2016-01-21 08:17:10 UTC
Permalink
Hi guys,

I want to know one thing on urgent basis that is JCIFS going to support
SMB2/SMB3 in future ?
It seems now only supports SMB1 and what if I want to upgrade it to latest
protocol(i.e. SMB2/SMB3) for using in Java application

Thanks in advance.


Thanks,
Viraj Patel
Christopher R. Hertel
2016-01-21 17:08:53 UTC
Permalink
I, personally, have no plan to write an SMB2/3 implementation in Java, but
I am (as my limited time permits) working on a Python implementation that
could (in theory) be used as a guide for someone else.

Chris -)-----
Post by Vir Vekaria
Hi guys,
I want to know one thing on urgent basis that is JCIFS going to support
SMB2/SMB3 in future ?
It seems now only supports SMB1 and what if I want to upgrade it to latest
protocol(i.e. SMB2/SMB3) for using in Java application
Thanks in advance.
Thanks,
Viraj Patel
--
"Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
Samba Team -- http://www.samba.org/ -)----- Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/ -)----- ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/ -)----- ***@ubiqx.mn.org
OnLineBook -- http://ubiqx.org/cifs/ -)----- ***@ubiqx.org
Vella, Shon
2016-01-21 17:21:18 UTC
Permalink
Chris,

How far along is your Python work? I'd be interested in working on the port
to Java (or perhaps it could be used from Java via Jython?)

*Shon Vella*
*Identity Automation*
Product Engineer
281-220-0021 x2030 office
281-817-5579 fax
www.identityautomation.com
Post by Christopher R. Hertel
I, personally, have no plan to write an SMB2/3 implementation in Java, but
I am (as my limited time permits) working on a Python implementation that
could (in theory) be used as a guide for someone else.
Chris -)-----
Post by Vir Vekaria
Hi guys,
I want to know one thing on urgent basis that is JCIFS going to support
SMB2/SMB3 in future ?
It seems now only supports SMB1 and what if I want to upgrade it to
latest protocol(i.e. SMB2/SMB3) for using in Java application
Thanks in advance.
Thanks,
Viraj Patel
--
"Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
Samba Team -- http://www.samba.org/ -)----- Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/ -)----- ubiqx development, uninq.
Christopher R. Hertel
2016-01-21 18:37:40 UTC
Permalink
I have the NBT transport layer finished, as well as some very basic SMB1
support (needed because SMB1 can be used to negotiate SMB2). Those parts
are (reasonably) complete.

I have a chunk of uncommitted code on my machine at home that has SMB2
Negotiate, Session Setup, and Error Response support. I have wanted to get
that code cleaned up a bit before committing it. Even then, it would be
incomplete (but it would be a good start). Once Session Setup is working,
several other commands can be implemented without too much hassle. The
next major headache after Session Setup is Create.

https://github.com/ubiqx-org/Carnaval

Chris -)-----
Post by Vella, Shon
Chris,
How far along is your Python work? I'd be interested in working on the
port to Java (or perhaps it could be used from Java via Jython?)
*Shon Vella*
*Identity Automation*
Product Engineer
281-220-0021 x2030 office
281-817-5579 fax
www.identityautomation.com
Post by Christopher R. Hertel
I, personally, have no plan to write an SMB2/3 implementation in Java,
but I am (as my limited time permits) working on a Python implementation
that could (in theory) be used as a guide for someone else.
Chris -)-----
Post by Vir Vekaria
Hi guys,
I want to know one thing on urgent basis that is JCIFS going to support
SMB2/SMB3 in future ?
It seems now only supports SMB1 and what if I want to upgrade it to
latest protocol(i.e. SMB2/SMB3) for using in Java application
Thanks in advance.
Thanks,
Viraj Patel
--
"Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
Samba Team -- http://www.samba.org/ -)----- Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/ -)----- ubiqx development, uninq.
--
"Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
Samba Team -- http://www.samba.org/ -)----- Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/ -)----- ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/ -)----- ***@ubiqx.mn.org
OnLineBook -- http://ubiqx.org/cifs/ -)----- ***@ubiqx.org
Caldarale, Charles R
2016-01-21 19:33:13 UTC
Permalink
On Behalf Of Christopher R. Hertel
Subject: Re: [jcifs] Query regarding the SMB support
I have the NBT transport layer finished
For curiosity's sake, why are you bothering with NBT?

- Chuck
Christopher R. Hertel
2016-01-21 20:10:36 UTC
Permalink
Fair Question. :)

1. It's amazingly easy to implement, once you know how to do it.
2. To my knowledge, there isn't anyone who actually knows it better than
me (which, in itself, has questionable value).
3. It is *still in use*, even in Windows.
4. Once you understand how it works, you realize that it can be very
useful and even beneficial in an enterprise environment.
5. Implementing it gave me a chance to get some code nailed down without
spending a lot of time.

I think the core of NBT took me a weekend to write initially. I've made
some updates and cleanups since then, but that's it. You should be able to
build an NBNS or write code to probe the NBT LAN using the modules I've
finished.

SMB2 is more involved, and I don't get a lot of free coding time these
days. I've been given the opportunity to write some worth-while code at
work, which leaves me less interested in coding in my free time.

Chris -)-----

On Thu, Jan 21, 2016 at 1:33 PM, Caldarale, Charles R <
Post by Caldarale, Charles R
On Behalf Of Christopher R. Hertel
Subject: Re: [jcifs] Query regarding the SMB support
I have the NBT transport layer finished
For curiosity's sake, why are you bothering with NBT?
- Chuck
--
"Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
Samba Team -- http://www.samba.org/ -)----- Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/ -)----- ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/ -)----- ***@ubiqx.mn.org
OnLineBook -- http://ubiqx.org/cifs/ -)----- ***@ubiqx.org
Michael B Allen
2016-01-22 01:15:18 UTC
Permalink
Post by Vir Vekaria
Hi guys,
I want to know one thing on urgent basis that is JCIFS going to support
SMB2/SMB3 in future ?
Hi Viraj,

Probably not. That is most definitely something for a major re-write.
JCIFS 1.x is "done" minus bug fixes AFAIC. Anything vaguely new should
just be a separate new package. Or you could fork but personally I
think it would be better to start fresh but with a very good
understanding of how JCIFS 1.x works because it actually does some
things quite well (message handing using the hashtable with mids is
clearly the best technique for handling concurrent messages).

If someone wants to contribute, we would all be delighted to see
someone take an interest. Writing network protocol code can be quite
fun and it is actually a little easier than anything that has to
interface with a human being (especially anything that uses the web
stack which is just broken IMO). But forget patches. If you want to
contribute (to anything and not just JCIFS), the best way is to create
a *working* stand-alone package and put it on github. Then people can
download something that works and then possibly modify it and upload
their working stand-alone package on github. So the development cycle
has no dependencies. That's the Linux way of doing things (which in a
screwed up way we have Samba's Andrew Tridgell to thank for that
because he pissed off the guy doing version control for Linux -
Remember that?! Ha ha).
Post by Vir Vekaria
It seems now only supports SMB1 and what if I want to upgrade it to latest
protocol(i.e. SMB2/SMB3) for using in Java application
Note that there are mountains of machines and code that use SMB1. The
only reason to use SMB2/3 would be if you really need a feature from
those versions and you know all the servers support it. The core
functionality of SMB2/3 is not inherently "better" than SMB1. SMB1 is
going to be around for decades and as such I suspect JCIFS 1.x will
continue to work as well as it ever has for at least as long.

Regarding pending bug fixes (of which there are many and I actually
have a very detailed list), the big hurdle with JCIFS bugfixes right
now is that I do not have the necessary infrastructure on which to
test. Specifically I need a broken and non-broken DFS network with
means multiple instances of Windows Server with broken and non-broken
replication which in practice means I probably need at least 4-5
instances of Windows Server that would just be used to properly test a
feature that most people aren't even using. Now if I could figure out
how to clone a VMware Workstation image but change the server SID and
hostname and crypto key and whatever else makes a Windows Server
installation unique, that might expedite things.

Mike
--
Michael B Allen
Java Active Directory Integration
http://www.ioplex.com/
Continue reading on narkive:
Loading...