-
Notifications
You must be signed in to change notification settings - Fork 51
Open
Labels
A-binariesArea: Related to binaries.Area: Related to binaries.C-requestCategory: A request for changes or a feature.Category: A request for changes or a feature.E-easyExperience: Easy difficulty. Experience needed to fix: Not much. Good first issue.Experience: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-help-wantedExperience: Call for participation: Help is requested to fix this issue.Experience: Call for participation: Help is requested to fix this issue.
Description
Feature
cuprated creates files with global read/execute permissions (rwxr-xr-x), any other process running on the machine can read these files.
Certain libraries that create files (e.g. LMDB) may set their own umask although cuprated does not. It would be prudent to set a private global umask before creating files:
| umask | file permissions |
|---|---|
027 |
rwxr-x--- |
007 |
rwx------ |
Implementation
Windows will need a separate impl.
fn main() {
// SAFETY: calling C.
unsafe {
libc::umask(0o027);
}
/* ... */
}SyntheticBird45
Metadata
Metadata
Assignees
Labels
A-binariesArea: Related to binaries.Area: Related to binaries.C-requestCategory: A request for changes or a feature.Category: A request for changes or a feature.E-easyExperience: Easy difficulty. Experience needed to fix: Not much. Good first issue.Experience: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-help-wantedExperience: Call for participation: Help is requested to fix this issue.Experience: Call for participation: Help is requested to fix this issue.