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

Ralph Böhme slow at samba.org
Wed Jul 26 09:47:21 UTC 2017

On Mon, Jul 24, 2017 at 04:11:09PM -0700, Omri Mor wrote:
> Alright, so here’s the latest version, incorporating the previous suggestions.
> It includes some modernizations to the existing code:
> 	DEBUG(10, …)	=>	DBG_DEBUG(…)
> 	if (… < 0)			=>	ret = …; if (ret < 0)
> That can be easily split into a different patch.

yes, please. Can you also please send your patches as git format patches as an
attachment? Thanks!

Btw, please also make yourself familiar with the git signed-of-by tag stuff:

> If we want to include the UUID (adVU), we’ll need to figure out where to store
> it.  gencache isn’t appropriate, from what I can tell—storing there requires a
> timeout (as it’s a *cache*),

It's essentially a store for data that can be *reconstructed*. You can set a
timeout of get_time_t_max() like sitename_store() does, but that doesn't really
help with the problem that we can't reconstruct the UUID if a user runs net
cache flush for some reason (and there are valid reasons to do that). I assume
that if the UUID of an existing TM destination changes, the client will likely
refuse to backup to it (iirc been there, done that), but can you verify this to
be sure?

> which doesn’t make sense for a persistent UUID.
> Perhaps secrets.tdb?

Na. :)

> The documentation says it stores “internal settings”, which the UUID would
> qualify for.  However, it’s not as if it’s ‘secret’ information, so I’m not
> sure if it’s a good fit.  Is there a database for generic, persistent data?

No, we'll have to roll our own for this purpose. Take a look at db_open() in
idmap_tdb_open_db() for an example of the API.

Not quite sure where to hook this into, it's generic enough to live in it's own
source file, probably in source3/lib/*.c|h, linking into samba3core. You can
then call it from the Avahi code.


More information about the samba-technical mailing list