Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There's an SMB2 FS on aminet, would it be possible to join forces / converge? #13

Open
luvwagn opened this issue Oct 15, 2024 · 2 comments

Comments

@luvwagn
Copy link

luvwagn commented Oct 15, 2024

There's an SMB2 FS on aminet, would it be possible to join forces / converge?

If I understand correctly, this one is SMB1 only, and many many NAS boxes don't support SMB1 anymore :(

@obarthel
Copy link
Owner

obarthel commented Oct 16, 2024

No, SMBv1 and SMBv2/v3 are two completely different worlds. smbfs, which I maintained over the past two decades and then some, is decidedly legacy technology. smbfs is based upon the Linux 2.01 kernel smbfs from 1995, which was adapted in 1996 as Sharity-Light for use with BSD Unix, Solaris, etc. at about the time when the first major Samba releases appeared. Both Samba and smbfs in Linux 2.01 are based upon independently reverse engineering the protocols and somehow making sense of the meagre documentation available at the time.

SMBv1/CIFS being the complex mess it always was, the smbfs and Sharity-Light code both were messy in their own ways. While what they accomplished worked well enough, the lack of any official documentation on the matter made it much harder to maintain smbfs and fix bugs. The funny part being that fixing bugs invariably led to interoperability issues, no matter what you did because SMBv1/CIFS was not designed to be extensible.

Trying to merge what smbfs and and smb2fs accomplish can only end in tears. Microsoft abandoned SMBv1/CIFS and started over with SMBv2/v3 because SMBv1/CIFS was such a train wreck. Today, the smbfs programs for AmigaOS 2.x/3.x and for AmigaOS4 are significantly larger than smb2fs is. This is due to the complexity of SMBv1/CIFS. Please have a look at the contents of the "smb_and_cifs_documentation" folder: it contains some 36 MBytes of documentation which should scare you. SMB was designed, essentially, before TCP/IP even was a thing in the late 1980'ies. TCP/IP support was grafted onto SMBv1/CIFS.

SMBv2/v3 deliberately went for a straightforward design, avoiding all the layered complexity, with options that themselves had suboptions, quirks, workarounds and emulation for past protocol messages. The big difference to SMBv1/CIFS being that you could actually implement a server and client by following the SMBv2/v3 specification. Samba, as it is today, evolved along with the availability of the official documentation at the time. You could probably not implement Samba from scratch just by using the existing SMBv1/CIFS documentation even if you tried.

Amiga smbfs still fills a need, being able to support those increasingly rare cases for which you have to be able to talk to a legacy system. It is also a decent enough example of how you would implement an Amiga file system, and specifically a networked file system client.

As always, use the right tool for the job. Combining the weaknesses of smbfs with the strengths of smb2fs would yield a much more complex tool which could not even share common networking code. A combination would be more than twice as large as smbfs or smb2fs are today and would still feature more than 45 command line options because SMBv1/CIFS support would need these.

@luvwagn
Copy link
Author

luvwagn commented Oct 16, 2024

I appreciate the thorough and detailed response, cheers :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants