| 1 | //go:build !gokrazy |
| 2 | |
| 3 | package restrict |
| 4 | |
| 5 | var defaultRoDirs = []string{ |
| 6 | // rsync needs /etc/passwd and /etc/group for user/group lookup. |
| 7 | // |
| 8 | // As of Go 1.24, the net package Go resolver reads |
| 9 | // the following DNS configurations files: |
| 10 | // |
| 11 | // - /etc/resolv.conf |
| 12 | // - /etc/hosts |
| 13 | // - /etc/services |
| 14 | // - /etc/nsswitch.conf |
| 15 | // |
| 16 | // Because the /etc/resolv.conf file might be re-created (by DHCP |
| 17 | // clients, Tailscale, or similar), we need to provide the entire |
| 18 | // /etc directory instead of individual files. Otherwise, the |
| 19 | // program seems to work at first and then fails DNS resolution |
| 20 | // after a while. |
| 21 | "/etc", |
| 22 | } |