Allow protected Windows profile publication while the public directory stays pinned
Rust development slice / linux (push) Failing after 6s

This commit is contained in:
2026-11-15 17:10:54 +01:00
parent aa36b178aa
commit e952698f5e
4 changed files with 36 additions and 4 deletions
+3 -1
View File
@@ -216,7 +216,9 @@ pub fn read_settings() -> Result<(Settings, Vec<PinnedFile>)> {
let agent = ipc::service_sid(crate::SERVICE_NAME)?;
let helper = ipc::service_sid(ipc::HELPER_SERVICE)?;
let readers = vec![agent, helper];
let root = PinnedFile::open(Path::new(PUBLIC_ROOT), true, &readers, &[], false)?;
// A rename into PUBLIC_ROOT opens the directory with FILE_ADD_FILE.
// The handle stays read-only and denies deletion of the pinned directory.
let root = PinnedFile::open_read_shared(Path::new(PUBLIC_ROOT), true, &readers, &[])?;
let mut file = PinnedFile::open(Path::new(CONFIG_PATH), false, &readers, &[], false)?;
ensure!(file.file.metadata()?.len() <= 32768, "SYSTEM_CONFIG_SIZE");
use std::io::Read;