You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
filesystem: make WriteFile file permissions more restrictive
Currently, the only usage of 'WriteFile()' is in the daemon providers, used
to write out their respective daemon configurations. The permissions '644'
were selected somewhat arbitrarily (corresponding to Git's "non-executable"
file mode). However, all other file writing in the repository uses the
permissions '600' (removing read permissions for group & all).
The daemon configuration files do not actually need anything more permissive
than '600', so change 'WriteFile()'s permissions accordingly. Then, rather
than simply modify the hardcoded value, create a const
'DefaultFilePermissions' to store the value, and do the same for 0o755 as
'DefaultDirPermissions'.
In addition to internal consistency, this sets us up to more easily use
'common.FileSystem' for file writing across the repository.
Signed-off-by: Victoria Dye <[email protected]>
0 commit comments