Commit 442b01d
committed
Fix permissions for resolv.conf and hosts
WriteFile uses syscall.Open, so permissions are modified by umask, if set.
For people using agressive umasks (0077), /etc/resolv.conf will end-up unreadable for non root processes.
See containerd#3704
Signed-off-by: apostasie <spam_blackhole@farcloser.world>1 parent 3c41efe commit 442b01d
2 files changed
+27
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
118 | 126 | | |
119 | 127 | | |
120 | 128 | | |
| |||
176 | 184 | | |
177 | 185 | | |
178 | 186 | | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
179 | 195 | | |
180 | 196 | | |
181 | 197 | | |
| |||
333 | 349 | | |
334 | 350 | | |
335 | 351 | | |
| 352 | + | |
336 | 353 | | |
337 | 354 | | |
338 | 355 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
317 | 317 | | |
318 | 318 | | |
319 | 319 | | |
320 | | - | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
321 | 330 | | |
322 | 331 | | |
323 | 332 | | |
| |||
0 commit comments