-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1251 from yw-liu/master
Add /etc/nsswitch.conf for /etc/hosts name resolution
- Loading branch information
Showing
4 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# /etc/nsswitch.conf | ||
# | ||
# As described on the web page https://man7.org/linux/man-pages/man3/gethostbyname.3.html, | ||
# without the nsswitch.conf file, the gethostbyname() and gethostbyaddr() domain queries | ||
# will fail to a local name server, thus the /etc/hosts will take no effect. | ||
# | ||
# For example, when hostaliases are specified for a kubernetes pod, without proper settings | ||
# defined in this file, the hostaliases settings will not take effect. | ||
# | ||
# Following contents of this file is from the ubuntu:16.04 docker image. | ||
|
||
passwd: compat | ||
group: compat | ||
shadow: compat | ||
gshadow: files | ||
|
||
hosts: files dns | ||
networks: files | ||
|
||
protocols: db files | ||
services: db files | ||
ethers: db files | ||
rpc: db files | ||
|
||
netgroup: nis |