Remove ens field from Context
It is no longer used due to the capability rework.
This commit is contained in:
@@ -141,7 +141,6 @@ pub struct Context {
|
||||
pub owner_proc_id: Option<NonZeroUsize>,
|
||||
|
||||
// TODO: Temporary replacement for existing kernel logic, replace with capabilities!
|
||||
pub ens: SchemeNamespace,
|
||||
pub euid: u32,
|
||||
pub egid: u32,
|
||||
pub pid: usize,
|
||||
@@ -197,7 +196,6 @@ impl Context {
|
||||
being_sigkilled: false,
|
||||
owner_proc_id,
|
||||
|
||||
ens: 0.into(),
|
||||
euid: 0,
|
||||
egid: 0,
|
||||
pid: 0,
|
||||
|
||||
@@ -196,7 +196,6 @@ fn kmain(bootstrap: Bootstrap) -> ! {
|
||||
context.name.push_str("[bootstrap]");
|
||||
|
||||
// TODO: Remove these from kernel
|
||||
context.ens = SchemeNamespace::from(1);
|
||||
context.euid = 0;
|
||||
context.egid = 0;
|
||||
}
|
||||
|
||||
+2
-4
@@ -1229,7 +1229,6 @@ impl ContextHandle {
|
||||
guard.name.push_str(debug_name);
|
||||
|
||||
guard.pid = info.pid as usize;
|
||||
guard.ens = (info.ens as usize).into();
|
||||
guard.euid = info.euid;
|
||||
guard.egid = info.egid;
|
||||
Ok(size_of::<ProcSchemeAttrs>())
|
||||
@@ -1421,15 +1420,14 @@ impl ContextHandle {
|
||||
ContextHandle::Attr => {
|
||||
let mut debug_name = [0; 32];
|
||||
let c = &context.read(token.token());
|
||||
let (euid, egid, ens, pid, name) =
|
||||
(c.euid, c.egid, c.ens.get() as u32, c.pid as u32, c.name);
|
||||
let (euid, egid, pid, name) = (c.euid, c.egid, c.pid as u32, c.name);
|
||||
let min = name.len().min(debug_name.len());
|
||||
debug_name[..min].copy_from_slice(&name.as_bytes()[..min]);
|
||||
buf.copy_common_bytes_from_slice(&ProcSchemeAttrs {
|
||||
pid,
|
||||
euid,
|
||||
egid,
|
||||
ens,
|
||||
ens: 0,
|
||||
debug_name,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -98,7 +98,6 @@ pub fn resource(token: &mut CleanLockToken) -> Result<Vec<u8>> {
|
||||
context.pid,
|
||||
context.euid,
|
||||
context.egid,
|
||||
context.ens.get(),
|
||||
stat_string,
|
||||
cpu_string,
|
||||
affinity,
|
||||
@@ -114,7 +113,6 @@ pub fn resource(token: &mut CleanLockToken) -> Result<Vec<u8>> {
|
||||
pid,
|
||||
euid,
|
||||
egid,
|
||||
ens,
|
||||
stat_string,
|
||||
cpu_string,
|
||||
affinity,
|
||||
@@ -125,11 +123,10 @@ pub fn resource(token: &mut CleanLockToken) -> Result<Vec<u8>> {
|
||||
{
|
||||
let _ = writeln!(
|
||||
string,
|
||||
"{:<6}{:<6}{:<6}{:<6}{:<6}{:<6}{:<11}{:<12}{:<8}{}",
|
||||
"{:<6}{:<6}{:<6}{:<6}{:<6}{:<11}{:<12}{:<8}{}",
|
||||
pid,
|
||||
euid,
|
||||
egid,
|
||||
ens,
|
||||
stat_string,
|
||||
cpu_string,
|
||||
affinity,
|
||||
|
||||
Reference in New Issue
Block a user