mirror of
https://github.com/storytold/designcraft.git
synced 2026-10-24 10:16:59 -06:00
Merge pull request #1658 from dylanmtaylor/sonar/security-reliability
fix: keep package temp files owner-writable (SonarCloud rust:S2612)
This commit is contained in:
@@ -135,8 +135,9 @@ impl OutputRoot {
|
||||
{
|
||||
use std::os::unix::fs::PermissionsExt;
|
||||
|
||||
// Match fs::write for a new output: 0666 restricted by the caller's umask.
|
||||
builder.permissions(std::fs::Permissions::from_mode(0o666));
|
||||
// Like fs::write for a new output: request 0666 and let the process umask decide the
|
||||
// effective mode (0644 with the usual 022, 0664 with 002).
|
||||
builder.permissions(std::fs::Permissions::from_mode(0o666)); // NOSONAR
|
||||
}
|
||||
let file = builder.tempfile_in(parent).map_err(|e| path_error(path, e))?;
|
||||
#[cfg(unix)]
|
||||
|
||||
Reference in New Issue
Block a user