mirror of
https://github.com/inspec/inspec
synced 2024-12-21 02:23:13 +00:00
1ea06ac3ea
* Change host resource to use getent ahosts on Linux In InSpec 1.31, we changed the `host` resource to use `dig` instead of `getent hosts` for name resolution because `getent hosts` does not return all entries (only the first v6 entry if it exists, then the first v4 entry) and we wanted to keep the Darwin and Linux implementation as close as possible. Unfortunately, this affected users' ability to do resolution checks for entried stored in their /etc/hosts file. This change goes back to using `getent` for Linux and changes to `getent ahosts` which returns both v4 and v6 records. Additionally, the Darwin provider's dig implementation was reordered to return v4 addresses before v6 addresses to be consistent with how `getent ahosts` returns records. Signed-off-by: Adam Leff <adam@leff.co> * Update unit tests for resolve_with_getent with proper output Signed-off-by: Adam Leff <adam@leff.co>
6 lines
199 B
Text
6 lines
199 B
Text
12.34.56.78 STREAM example.com
|
|
12.34.56.78 DGRAM
|
|
12.34.56.78 RAW
|
|
2606:2800:220:1:248:1893:25c8:1946 STREAM
|
|
2606:2800:220:1:248:1893:25c8:1946 DGRAM
|
|
2606:2800:220:1:248:1893:25c8:1946 RAW
|