🔒 [security] Set restricted permissions on socket and runtime directory (#40)

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
This commit is contained in:
Tarasov Aleksandr
2026-03-21 21:03:48 +03:00
committed by GitHub
parent b8baeb6226
commit 6114b9a7f8
2 changed files with 5 additions and 0 deletions
+2
View File
@@ -6,6 +6,7 @@ use crate::{
},
utils::pipewire::{create_link, get_device},
};
use std::os::unix::fs::PermissionsExt;
use std::path::PathBuf;
use std::{error::Error, fs};
use tokio::{
@@ -84,6 +85,7 @@ pub fn create_runtime_dir() -> Result<(), Box<dyn Error>> {
if !runtime_dir.exists() {
fs::create_dir_all(&runtime_dir)?;
}
fs::set_permissions(&runtime_dir, fs::Permissions::from_mode(0o700))?;
Ok(())
}