pub struct ExecMount { /* private fields */ }Expand description
VFS mount that projects a SandboxPool’s active sandboxes as
/exec/instances/<id>/{ctl,status,exit,ns}.
Mount at /exec/instances in the namespace (the parent /exec tree —
backends/, classes/, pool/, sched/ — is out of scope for this
issue; see the design doc §4).
Implementations§
Source§impl ExecMount
impl ExecMount
Sourcepub fn new(pool: Arc<SandboxPool>) -> Self
pub fn new(pool: Arc<SandboxPool>) -> Self
Create a new ExecMount over the given pool, unenforced.
No lifecycle policy is installed: destructive ctl verbs behave as
before (the dormant posture). To arm fail-closed mediation, use
Self::new_with_lifecycle.
Sourcepub fn new_with_lifecycle(
pool: Arc<SandboxPool>,
policy: Arc<dyn LifecyclePolicy>,
) -> Self
pub fn new_with_lifecycle( pool: Arc<SandboxPool>, policy: Arc<dyn LifecyclePolicy>, ) -> Self
Create a new ExecMount with a MAC lifecycle policy armed.
Every destructive verb (stop/kill/destroy) written to
/exec/instances/<id>/ctl must pass policy.authorize(caller, id, verb)
before the backend is touched; a denial yields
MountError::PermissionDenied. Pass DenyAllLifecycle for the
fail-closed default during the #698 dependency window.
Sourcepub async fn exec_task(
&self,
id: &str,
caller: &Subject,
command: &[String],
timeout_secs: u64,
) -> Result<TaskExecResult, MountError>
pub async fn exec_task( &self, id: &str, caller: &Subject, command: &[String], timeout_secs: u64, ) -> Result<TaskExecResult, MountError>
Execute through the selected sandbox backend and project the terminal stdout/stderr onto this instance’s fd streams. This is the task-runtime bridge: callers do not receive a second host-path or socket interface.
Trait Implementations§
Source§impl Mount for ExecMount
impl Mount for ExecMount
Source§fn walk<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
components: &'life1 [&'life2 str],
_caller: &'life3 Subject,
) -> Pin<Box<dyn Future<Output = Result<Fid, MountError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn walk<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
components: &'life1 [&'life2 str],
_caller: &'life3 Subject,
) -> Pin<Box<dyn Future<Output = Result<Fid, MountError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Source§fn open<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_fid: &'life1 mut Fid,
_mode: u8,
_caller: &'life2 Subject,
) -> Pin<Box<dyn Future<Output = Result<(), MountError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn open<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_fid: &'life1 mut Fid,
_mode: u8,
_caller: &'life2 Subject,
) -> Pin<Box<dyn Future<Output = Result<(), MountError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
mode: OREAD=0, OWRITE=1, ORDWR=2.Source§fn read<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
fid: &'life1 Fid,
offset: u64,
count: u32,
_caller: &'life2 Subject,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, MountError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn read<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
fid: &'life1 Fid,
offset: u64,
count: u32,
_caller: &'life2 Subject,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, MountError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn write<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
fid: &'life1 Fid,
_offset: u64,
data: &'life2 [u8],
caller: &'life3 Subject,
) -> Pin<Box<dyn Future<Output = Result<u32, MountError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn write<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
fid: &'life1 Fid,
_offset: u64,
data: &'life2 [u8],
caller: &'life3 Subject,
) -> Pin<Box<dyn Future<Output = Result<u32, MountError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Source§fn readdir<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
fid: &'life1 Fid,
_caller: &'life2 Subject,
) -> Pin<Box<dyn Future<Output = Result<Vec<DirEntry>, MountError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn readdir<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
fid: &'life1 Fid,
_caller: &'life2 Subject,
) -> Pin<Box<dyn Future<Output = Result<Vec<DirEntry>, MountError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn stat<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
fid: &'life1 Fid,
_caller: &'life2 Subject,
) -> Pin<Box<dyn Future<Output = Result<Stat, MountError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn stat<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
fid: &'life1 Fid,
_caller: &'life2 Subject,
) -> Pin<Box<dyn Future<Output = Result<Stat, MountError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn clunk<'life0, 'life1, 'async_trait>(
&'life0 self,
_fid: Fid,
_caller: &'life1 Subject,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn clunk<'life0, 'life1, 'async_trait>(
&'life0 self,
_fid: Fid,
_caller: &'life1 Subject,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn create<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_fid: &'life1 mut Fid,
_name: &'life2 str,
_perm: u32,
_mode: u8,
_caller: &'life3 Subject,
) -> Pin<Box<dyn Future<Output = Result<Stat, MountError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn create<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_fid: &'life1 mut Fid,
_name: &'life2 str,
_perm: u32,
_mode: u8,
_caller: &'life3 Subject,
) -> Pin<Box<dyn Future<Output = Result<Stat, MountError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Tcreate). Read moreAuto Trait Implementations§
impl !Freeze for ExecMount
impl !RefUnwindSafe for ExecMount
impl Send for ExecMount
impl Sync for ExecMount
impl Unpin for ExecMount
impl UnsafeUnpin for ExecMount
impl !UnwindSafe for ExecMount
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more