Implement O_DIRECTORY, switch to open for mkdir
This commit is contained in:
parent
09fb7d1d69
commit
c018bfe5ef
1 changed files with 33 additions and 44 deletions
|
|
@ -468,7 +468,7 @@ pub fn exec(path: &[u8], arg_ptrs: &[[usize; 2]]) -> Result<usize> {
|
|||
(context.euid, context.egid, context.canonicalize(path))
|
||||
};
|
||||
|
||||
let file = syscall::open(&canonical, 0)?;
|
||||
let file = syscall::open(&canonical, syscall::flag::O_RDONLY)?;
|
||||
let mut stat = Stat::default();
|
||||
syscall::file_op_mut_slice(syscall::number::SYS_FSTAT, file, &mut stat)?;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue