vfs_fruit: Time Machine/FULLSYNC: add mDNS/DNS-SD advertisement

Omri Mor omri50 at gmail.com
Fri Jul 21 06:37:10 UTC 2017


>> The Apple spec doesn’t document sys=waMa=0,adVF=0x100, which some of the
>> users (as well as Netatalk) say is needed.
>> One source (https://dreness.com/blog/archives/48) found that waMa is the MAC
>> address.
> 
> For completeness here is the advertised mDNS configuration from a Mac
> Server that I have laying around:
> ProductName: Mac OS X
> ProductVersion: 10.12
> BuildVersion: 16A323
> 
> sys=waMa=0,adVF=0x100
> dk0=adVN=Documents,adVF=0xa3,adVU=E14DFBCB-A2FC-418D-BCCB-528344A807A4

Interesting: macOS Server uses waMa=0, while the embedded devices (AirPort Base Station, Time Capsule, etc) have it set to the MAC address.
Perhaps ‘waMa’ means ‘Wireless AirDisk MAC Address’? So that it’s set only on devices connected to the local network using Wi-Fi.
Or something else; I really have no idea. In any case, setting it to 0 doesn’t seem to do any harm.
I’ve set it to the MAC address of the ethernet interface in my config, but haven’t noticed in changes yet. Maybe it only matters when the gateway (router) is hosting the file server? No idea. 

> I did some testing and I think I might have a reasonable guess as to
> what sys=adVF=0x100 is used for (tested with and without waMa=0 with
> the same results). It appears that setting tells the client whether it
> should enumerate shares using the NetShareEnumAll IOCTL (srvsvc.opnum
> == 15 in Wireshark). The setting itself it not important to Time
> Machine backups working properly from what I can tell but I feel if
> Samba is to configure the advertisement (which I am for) it should
> also set sys=adVF=0x100 as well.
> 
> - With adVF=0x100;With a homes section defined: Finder and Linux
> smbclient enumerates all the shares. A NetShareEnumAll call is also
> made to the server with a proper response. All shares are accessible
> - Without adVF=0x100;With a homes section defined: Linux smbclient
> enumerates the shares but Finder only sees the capsule share and a
> share named after my user. I can connect to the shown shares and
> manually connecting to the other shares does work properly.
> - With adVF=0x100; Without a homes section defined: Finder and Linux
> smbclient enumerates all of the shares. A NetShareEnumAll call is also
> made to the server with a proper response. All shares are accessible.
> - Without adVF=0x100;Without a homes section defined: Linux smbclient
> enumerates the shares but Finder only see the capsule share and a
> share named after my user. Connecting to the shares manually works
> with the exception of the invalid user share.
> 
> NOTE: It appears the adVF=0x100 setting is only required when a
> _adisk._tcp service is presented for that device. If the _adisk._tcp
> service is not defined for a server, the MacOS client always
> enumerates shares with NetShareEnumAll IOCTL.

Thanks for digging into the internals.
*Not* enumerating shares with NetShareEnumAll seems like an utterly bizarre default to have. I have no idea what Apple was thinking.
So yes, let’s set 0x100.

Omri


More information about the samba-technical mailing list