Re: Deprecating smbfs(5) and removing it before FreeBSD 14

From: Rick Macklem <rmacklem_at_uoguelph.ca>
Date: Thu, 16 Jun 2022 13:56:19 UTC
Miroslav Lachman <000.fbsd@quip.cz> wrote:
> On 24/01/2022 16:13, Rick Macklem wrote:
>
[...]
>
> > So, I think Mark and Yuri are correct and looking at up to date
> > Illumos sources is the next step.
> > (As I mentioned, porting the Apple sources is beyond what I am
> >   willing to attempt.)
> >
> > rick
>
> Hello Rick,
> I would like to ask you I there is some progress with porting newer
> SMBFS / CIFS version to FreeBSD? Did you find Illumos sources as a
> possibility where to start porting?
Yes. I have the stuff off Illumos-gate, which I think is pretty up-to-date
and I agree that it should be easier than the Apple stuff to port into
FreeBSD.  I don't think it is "straightforward" as someone involved
with Illumos said, due to the big differences in VFS/locking, but...

Having said the above, I have not done much yet. I've been cleaning up
NFS stuff, although I am nearly done with that now.
I do plan on starting to work on it soon, but have no idea if/when I
will have something that might be useful for others.

> We have more and more problems with current state of mount_smbfs. I
> would be really glad if "somebody" can do the heroic work of
> implementing SMBv2 in FreeBSD.
> Maybe it's time to start some fundraising for sponsoring this work?
Well, funding isn't an issue for me (I'm just a retired guy who does this
stuff as a hobby). However, if there is someone else who is capable of
doing it if they are funded, I have no problem with that.
I could either help them, or simply stick with working on NFS and leave
SMBv23 to them.

Sorry, but I cannot report real progress on this as yet, rick

Kind regards
Miroslav Lachman


> ________________________________________
> From: owner-freebsd-current@freebsd.org <owner-freebsd-current@freebsd.org> on behalf of David Chisnall <theraven@FreeBSD.org>
> Sent: Monday, January 24, 2022 5:16 AM
> To: freebsd-current@freebsd.org
> Subject: Re: Deprecating smbfs(5) and removing it before FreeBSD 14
>
> CAUTION: This email originated from outside of the University of Guelph. Do not click links or open attachments unless you recognize the sender and know the content is safe. If in doubt, forward suspicious emails to IThelp@uoguelph.ca
>
>
> On 22/01/2022 23:20, Rick Macklem wrote:
>> Mark Saad <nonesuch@longcount.org> wrote:
>> [stuff snipped]
>>> So I am looking at the Apple and Solaris code, provided by rick. I am not
>>> sure if the illumos code provides SMB2 support. They based the solaris
>>> code on Apple SMB-217.x which is from OSX 10.4 . Which I am sure
>>> predates smb2 .
>>>
>>> https://github.com/apple-oss-distributions/smb/tree/smb-217.19
>>>
>>> If I am following this correctly we need to look at Apple's smb client
>>> from OSX 10.9  which is where I start to see bits about smb2
>>>
>>> https://github.com/apple-oss-distributions/smb/tree/smb-697.95.1/kernel/netsmb
>>>
>>> This is also where this stuff starts to look less and less like FreeBSD .
>>> Let me ask some of the illumos people I know to see if there is
>>> anything they can point to.
>> Yes. Please do so. I saw the "old" calls fo things like open and the
>> new ntcreate version, so I assumed that was the newer SMB.
>> If it is not, there is no reason to port it.
>>
>> The new Apple code is a monster. 10x the lines of C and a lot of
>> weird stuff that looks Apple specific.
>>
>> It might actually be easier to write SMBv2 from the spec than port
>> the Apple stuff.
>> --> I'll try and look at whatever Microsoft publishes w.r.t. SMBv2/3.
>>
>> Thanks for looking at this, rick
>
> The docs are public:
>
> https://docs.microsoft.com/en-gb/openspecs/windows_protocols/ms-smb2/5606ad47-5ee0-437a-817e-70c366052962
>
>
> Note that the spec is 480 pages, it is not a trivial protocol to
> implement from scratch.
>
> David
>
>