Age | Commit message (Collapse) | Author |
|
This makes sure nss-myhostname not only resolves the local host name to
127.0.0.2/::1 but also the host name 'localhost: to 127.0.0.1/::1. This
makes installation of /etc/passwd optional, as it usually only includes
a mapping for 'localhost'.
This change also resolves ::1 to the local hostname (as before), but
also lists 'localhost' as an alias. This means look-ups are now fully
reversible, even though they are 1:n mappings.
Finally, the module will no longer erroneously claim that local IP
addresses which aren't on the loopback device were.
|
|
|
|
http://lists.freedesktop.org/archives/systemd-devel/2013-April/010510.html
|
|
|
|
Fixes a segfault in nscd when using nss-myhostname.
Nscd expects that an NSS module's gethostbyname4_r function returns
its first result in the pre-allocated gaih_addrtuple denoted by **pat.
(See nscd/aicache.c in the Glibc sources.) However, nss-myhostname
doesn't fill in **pat but allocates the first result in ‘buffer’, then
sets *pat. So nscd crashes (e.g. when running ‘getent ahosts
my-machine’).
Hard to tell if this is a bug in nscd, since there doesn't seem to be
a proper API spec for gethostbyname4_r. But in any case, this patch
fixes the crash by copying the first result to **pat.
|
|
Also update the licence in the source files.
|
|
In order to merge into the systemd repos.
|