The data file is rewritten as the "effective user", it should probably be "maintained".
When you switch back to your real user, you can now no-longer access the data file, sometimes. I don't have exact reproduction steps from memory.
Alternatively, we could "derive" the user from the home directory? Or ignore umasks on purpose? Almost certainly just "maintain" is better. Or detect root / euid, and then do some magic? Maybe we should ignore umasks and go ultra-private instead (like ~/.ssh).
The data file is rewritten as the "effective user", it should probably be "maintained".
When you switch back to your real user, you can now no-longer access the data file, sometimes. I don't have exact reproduction steps from memory.
Alternatively, we could "derive" the user from the home directory? Or ignore umasks on purpose? Almost certainly just "maintain" is better. Or detect
root
/euid
, and then do some magic? Maybe we should ignore umasks and go ultra-private instead (like~/.ssh
).