Commit 8b85eaa
committed
config: save files with inferred ownership
Don't use SUDO_UID and SUDO_GID. Just make the file match the folder
it's being written into. The vast majority of the time, this will be
the user's home directory, but if it's not, then we should not leave a
user-owned file in a root-owned location. And, if running as root
without SUDO_UID/SUDO_GID environs, but putting a config file in the
user's home dir, then it's quite rude to leave it root-owned.1 parent 0260572 commit 8b85eaa
1 file changed
Lines changed: 15 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
| 34 | + | |
| 35 | + | |
38 | 36 | | |
39 | 37 | | |
40 | 38 | | |
| |||
283 | 281 | | |
284 | 282 | | |
285 | 283 | | |
286 | | - | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
287 | 288 | | |
288 | | - | |
| 289 | + | |
289 | 290 | | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
295 | 299 | | |
296 | 300 | | |
297 | 301 | | |
| |||
0 commit comments