diff options
author | Elliott Hughes <enh@google.com> | 2019-01-19 11:32:54 -0800 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2019-01-19 14:34:55 -0600 |
commit | 7bfdff085dca664b3bbda50371f4f67be2fbd5cf (patch) | |
tree | 86b4df8128b2766d4663a2bd56802b457f68a428 /toys/posix/uuencode.c | |
parent | e47144c8d0bc4fe1986403ade1e3d54a5c94f993 (diff) | |
download | toybox-7bfdff085dca664b3bbda50371f4f67be2fbd5cf.tar.gz |
hostname: fix behavior when in jail.
Only -d and -f should cause a DNS lookup. The rest should just act
directly on the result of gethostname(3). Encountered with the AOSP
buildbots' use of nsjail, but tested with both the Debian hostname and
toybox hostname thus:
```
unshare -Uunr sh
hostname android-build
hostname
hostname -s
hostname -d
hostname -f
```
(Not sure how to add that to the tests.)
Also fix a SEGV with -s if the hostname doesn't contain a '.'.
Also switch to the FLAG() macro.
Also add the missing -s to the synopsis.
Bug: http://b/123123255
Diffstat (limited to 'toys/posix/uuencode.c')
0 files changed, 0 insertions, 0 deletions