Michael Stone <mst...@debian.org> writes:

> On Mon, Sep 16, 2024 at 11:18:19AM +0200, Steve Keller wrote:
> >Is there a config option in libc, the host name resolver or somewhere
> >else to show hostnames in my own domain without the full domain name?
> 
> no

You could at least achieve that desired behavior by putting all your
local hosts to /etc/hosts without domain name.  You would have to do
this on all your hosts (or NIS aka YP, if you have that).  Ugly, if
you already have DNS running.

The getnameinfo(3) function has a flag NI_NOFQDN which would do what
you want for local hosts, but that doesn't help here.

So, missing is only a global config flag for getnameinfo() that let's
it behave as if NI_NOFQDN had been specified if the domain name
matches the one in /etc/resolv.conf.  Useful would also be another
flag to strip domain names that are listed in /etc/resolv.conf in the
"search" entry.  I also would like such a functionality.

urs

Reply via email to