Implement unix permissions
This commit is contained in:
+1
-1
@@ -29,7 +29,7 @@ impl DiskScheme {
|
||||
}
|
||||
|
||||
impl Scheme for DiskScheme {
|
||||
fn open(&self, path: &[u8], _flags: usize) -> Result<usize> {
|
||||
fn open(&self, path: &[u8], _flags: usize, _uid: u32, _gid: u32) -> Result<usize> {
|
||||
let path_str = str::from_utf8(path).or(Err(Error::new(ENOENT)))?;
|
||||
|
||||
let i = path_str.parse::<usize>().or(Err(Error::new(ENOENT)))?;
|
||||
|
||||
+1
-1
@@ -70,7 +70,7 @@ impl DisplayScheme {
|
||||
}
|
||||
|
||||
impl Scheme for DisplayScheme {
|
||||
fn open(&self, path: &[u8], _flags: usize) -> Result<usize> {
|
||||
fn open(&self, path: &[u8], _flags: usize, _uid: u32, _gid: u32) -> Result<usize> {
|
||||
if path == b"input" {
|
||||
Ok(1)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user