Allow protected Windows profile publication while the public directory stays pinned
Rust development slice / linux (push) Failing after 6s
Rust development slice / linux (push) Failing after 6s
This commit is contained in:
@@ -53,7 +53,7 @@ impl Client {
|
||||
ipc::service_sid(crate::SERVICE_NAME)?,
|
||||
ipc::service_sid(ipc::HELPER_SERVICE)?,
|
||||
];
|
||||
let _root = ipc::PinnedFile::open(Path::new(PUBLIC_ROOT), true, &readers, &[], false)?;
|
||||
let _root = ipc::PinnedFile::open_read_shared(Path::new(PUBLIC_ROOT), true, &readers, &[])?;
|
||||
let mut file = ipc::PinnedFile::open(Path::new(PIN_PATH), false, &readers, &[], false)?;
|
||||
ensure!(file.file.metadata()?.len() <= 16384, "HELPER_PIN_SIZE");
|
||||
let mut bytes = Vec::new();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -751,12 +751,11 @@ mod installed {
|
||||
settings.agent.service_sid.clone(),
|
||||
settings.helper.service_sid.clone(),
|
||||
];
|
||||
files.push(PinnedFile::open(
|
||||
files.push(PinnedFile::open_read_shared(
|
||||
Path::new(PUBLIC_ROOT),
|
||||
true,
|
||||
&readers,
|
||||
&[],
|
||||
false,
|
||||
)?);
|
||||
let mut config_file =
|
||||
PinnedFile::open(Path::new(CONFIG_PATH), false, &readers, &[], false)?;
|
||||
|
||||
Reference in New Issue
Block a user