Skip to content

Commit d75c47c

Browse files
authored
Merge pull request #2307 from microsoft/agents/issue-2304-limit-platform-check-helpers
nvx: limit platform-only checks to the platform module
2 parents ebaffcb + 7a3c2a7 commit d75c47c

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎nvx/src/host/platform/linux/private.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ pub(crate) fn check_store_dir(path: &Path) -> io::Result<Option<String>> {
7676

7777
/// Returns why the directory `path` is not private to the current user, if it is not: unless it
7878
/// is a directory, not a link to one, that belongs to the user and grants no one else any access.
79-
pub(crate) fn check_owner_only_dir(path: &Path) -> io::Result<Option<String>> {
79+
fn check_owner_only_dir(path: &Path) -> io::Result<Option<String>> {
8080
let Some(directory) = open_plain_dir(path)? else {
8181
return Ok(Some("is not a plain directory".to_owned()));
8282
};

‎nvx/src/host/platform/mod.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ pub(crate) fn sync_dir(dir: &Path) -> Result<()> {
307307
/// Refuses a VMM working directory that exceeds Windows' process-creation limit, without
308308
/// accessing the filesystem.
309309
#[cfg(windows)]
310-
pub(crate) fn check_working_dir(path: &std::path::Path) -> Result<()> {
310+
fn check_working_dir(path: &std::path::Path) -> Result<()> {
311311
use std::os::windows::ffi::OsStrExt;
312312
use windows_sys::Win32::Foundation::MAX_PATH;
313313

‎nvx/src/host/platform/other.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ pub(crate) fn check_store_dir(_path: &Path) -> io::Result<Option<String>> {
174174
}
175175

176176
/// Fails: this host cannot check who may access a directory.
177-
pub(crate) fn check_owner_only_dir(_path: &Path) -> io::Result<Option<String>> {
177+
fn check_owner_only_dir(_path: &Path) -> io::Result<Option<String>> {
178178
Err(unsupported())
179179
}
180180

0 commit comments

Comments
 (0)