feat(apps): permission manager equips apps (manifest+consent+decisions in /system), launches via init w/ file grant; shell unprivileged (/home); install/apps/allow/revoke; revoke stops running app; app-image tool; counter app
This commit is contained in:
@@ -49,6 +49,8 @@ impl DirEntry {
|
||||
pub struct Storage {
|
||||
ep: CapSlot,
|
||||
buf: &'static mut [u8],
|
||||
/// What maps `buf`; dropping it unmaps it.
|
||||
region: CapSlot,
|
||||
}
|
||||
|
||||
impl Storage {
|
||||
@@ -66,7 +68,12 @@ impl Storage {
|
||||
};
|
||||
let mapped = crate::window::map_buffer(region, va).map_err(|_| FsError::Failed)?;
|
||||
let buf = mapped.get_mut(..size).ok_or(FsError::Failed)?;
|
||||
Ok(Self { ep, buf })
|
||||
Ok(Self { ep, buf, region })
|
||||
}
|
||||
|
||||
/// Unmaps the buffer, freeing its address for another connection.
|
||||
pub fn detach(self) {
|
||||
syscall::drop_cap(self.region);
|
||||
}
|
||||
|
||||
fn call(&self, words: [usize; 4]) -> Result<[usize; 4]> {
|
||||
|
||||
Reference in New Issue
Block a user