Avahi service name

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Avahi service name

Samba - samba-technical mailing list
Samba currently advertises Avahi services under its NetBIOS name.
Since this is DNS-SD, it may make more sense to advertise under the hostname instead.
Since the NetBIOS name is uppercased, using it can be surprising to users.
There also isn’t any error checking on the NetBIOS name—if it is too long (greater than AVAHI_LABEL_MAX = 64 bytes, including null terminator), then avahi_entry_group_add_service() fails.
Obtaining the hostname can be done using gethostname() directly, or by get_myname() from libsamba-util (which calls gethostname() internally).

Thoughts on retaining NetBIOS name (truncating it if too long) versus using hostname?

Omri
Reply | Threaded
Open this post in threaded view
|

Re: Avahi service name

Samba - samba-technical mailing list
On Fri, 1 Sep 2017 11:56:42 -0500
Omri Mor via samba-technical <[hidden email]> wrote:

> Samba currently advertises Avahi services under its NetBIOS name.
> Since this is DNS-SD, it may make more sense to advertise under the
> hostname instead. Since the NetBIOS name is uppercased, using it can
> be surprising to users. There also isn’t any error checking on the
> NetBIOS name—if it is too long (greater than AVAHI_LABEL_MAX = 64
> bytes, including null terminator), then
> avahi_entry_group_add_service() fails. Obtaining the hostname can be
> done using gethostname() directly, or by get_myname() from
> libsamba-util (which calls gethostname() internally).
>
> Thoughts on retaining NetBIOS name (truncating it if too long) versus
> using hostname?
>
> Omri

How shall I put this, I run Devuan, one of the first things I do when
installing Samba is 'apt-get purge avahi-deamon'. On a DC it just gets
in the way.

Rowland