hostname
is set to localhost on our nixos machines
#163
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Dumping a bit of research I've done here. I think this might be highly relevant to get heimdal to work properly as well. This is incomplete.
inetutils
hostname
During the resolving step,
gethostbyname
is being usedThe manpage marks this function as outdated.
Debian
hostname
Debian provides a newer
hostname
command that uses more modern syscalls.Debians
hostname
command goes a little bit something like this:hostname
Just
gethostname()
with some memory and error handlingbekkalokk output
hostname --fqdn
bekkalokk output
hostname --all-fqdns
bekkalokk output
Considering
ip a
's output:I suppose that means that
getnameinfo("129.241.210.168")
results inbekkalokk
?Behind
getaddrinfo
,getaddrinfo
andgetnameinfo
getnameinfo
seems to get its information from NSS but do the others?With systemd-resolved enabled, it states itself that it would prefer to come first in the list of host resolvers (nss-resolve(8))
systemd-resolved will handle querying
/etc/hosts
and other sources.NixOS follows up on this recommendation
bekkalokk
/etc/nsswitch.conf
bekkalokk
/etc/hosts
NixOS puts localhost first in queue, before fqdn, with comments stating that fqdn is there for nss, but that other programs might expect localhost to be first
e2605d0744/nixos/modules/config/networking.nix (L158-L185)
systemd-resolved nss-resolve module
https://github.com/systemd/systemd/blob/main/src/nss-resolve/nss-resolve.c
Systemd nss resolve talks to resolved via varlink.