diff options
author | Michael Tokarev <mjt@tls.msk.ru> | 2013-12-17 19:13:45 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2013-12-17 19:13:45 +0100 |
commit | e9355c43263efd8f9b31b83c4e2aeba4a82de75e (patch) | |
tree | 7d111167cd5060ddbcaae9383107927d9af54340 /editors/sed_summary.htm | |
parent | 4967a41ba1d17090e764952975c651b22fd183d1 (diff) | |
download | busybox-e9355c43263efd8f9b31b83c4e2aeba4a82de75e.tar.gz |
hostname: do not use gethostbyname() for "hostname -s"
There's no reason to call gethostbyname() on the value returned
by uname() when asked just for a short name of a host. This may
also be wrong, when uname is set to one value, but in /etc/hosts
(or elsewhere) the "canonical" name is different. This is often
the case for localhost entry in /etc/hosts:
127.0.0.1 localhost myname
With this content of /etc/hosts, and uname being set to myname,
busybox hostname -s will return localhost, while regular
hostname utility returns myname.
Fix this by not calling gethostbyname() for the simple
'hostname -s' use.
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'editors/sed_summary.htm')
0 files changed, 0 insertions, 0 deletions