5
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

golangのruntimeからアクセスする/etcのファイル

Posted at

メモ。

golang 1.10.1 のソースディレクトリで "/etc" をgit grep してコメント行などを手で削ったもの。Linux以外のものも削った。
これらが、golangの標準ライブラリの中から参照される可能性のある /etc/ のファイル。

crypto/x509/root_linux.go:	"/etc/ssl/certs/ca-certificates.crt",                // Debian/Ubuntu/Gentoo etc.
crypto/x509/root_linux.go:	"/etc/pki/tls/certs/ca-bundle.crt",                  // Fedora/RHEL 6
crypto/x509/root_linux.go:	"/etc/ssl/ca-bundle.pem",                            // OpenSUSE
crypto/x509/root_linux.go:	"/etc/pki/tls/cacert.pem",                           // OpenELEC
crypto/x509/root_linux.go:	"/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem", // CentOS/RHEL 7

mime/type_unix.go:	"/etc/mime.types",
mime/type_unix.go:	"/etc/apache2/mime.types",
mime/type_unix.go:	"/etc/apache/mime.types",

net/conf.go:		confVal.nss = parseNSSConfFile("/etc/nsswitch.conf")
net/conf.go:	confVal.resolv = dnsReadConfig("/etc/resolv.conf")
net/conf.go:	if _, err := os.Stat("/etc/mdns.allow"); err == nil {
net/dnsclient_unix.go:		conf.dnsConfig = dnsReadConfig("/etc/resolv.conf")
net/dnsclient_unix.go:	resolvConf.tryUpdate("/etc/resolv.conf")
net/dnsclient_unix.go:	resolvConf.tryUpdate("/etc/resolv.conf")
net/hook.go:	testHookHostsPath = "/etc/hosts"
net/lookup_unix.go:	file, err := open("/etc/protocols")
net/port_unix.go:	file, err := open("/etc/services")

os/user/lookup_unix.go:const groupFile = "/etc/group"
os/user/lookup_unix.go:const userFile = "/etc/passwd"
time/zoneinfo_unix.go:		z, err := loadLocation("localtime", []string{"/etc/"})
5
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?