pub fn sys_faccessat(
        &self,
        dirfd: FileDesc,
        path: UserInPtr<u8>,
        mode: usize,
        flags: usize,
    ) -> SysResult {
        // TODO: check permissions based on uid/gid
        let path = path.read_cstring()?;
        let flags = AtFlags::from_bits_truncate(flags);
        info!(
            "faccessat: dirfd={:?}, path={:?}, mode={:#o}, flags={:?}",
            dirfd, path, mode, flags
        );
        let proc = self.linux_process();
        let follow = !flags.contains(AtFlags::SYMLINK_NOFOLLOW);
        let _inode = proc.lookup_inode_at(dirfd, &path, follow)?;
        Ok(0)
    }
/// Check user's permissions of a file relative to a directory file descriptor
/// TODO: check permissions based on uid/gid
Check user's permissions of a file relative to a directory file descriptor
TODO: check permissions based on uid/gid
Check user ' s permissions of a file relative to a directory file descriptor TODO : check permissions based on uid / gid
pub fn sys_faccessat(
        &self,
        dirfd: FileDesc,
        path: UserInPtr<u8>,
        mode: usize,
        flags: usize,
    ) -> SysResult {
        // TODO: check permissions based on uid/gid
        let path = path.read_cstring()?;
        let flags = AtFlags::from_bits_truncate(flags);
        info!(
            "faccessat: dirfd={:?}, path={:?}, mode={:#o}, flags={:?}",
            dirfd, path, mode, flags
        );
        let proc = self.linux_process();
        let follow = !flags.contains(AtFlags::SYMLINK_NOFOLLOW);
        let _inode = proc.lookup_inode_at(dirfd, &path, follow)?;
        Ok(0)
    }
pub fn sys_faccessat ( & self , dirfd : FileDesc , path : UserInPtr < u8 > , mode : usize , flags : usize , ) -> SysResult { // TODO: check permissions based on uid/gid let path = path . read_cstring ( ) ? ; let flags = AtFlags :: from_bits_truncate ( flags ) ; info ! ( " " dirfd path mode flags ) ; let proc = self . linux_process ( ) ; let follow = ! flags . contains ( AtFlags :: SYMLINK_NOFOLLOW ) ; let _inode = proc . lookup_inode_at ( dirfd , & path , follow ) ? ; Ok ( 0 ) }
Check user's permissions of a file relative to a directory file descriptor
TODO: check permissions based on uid/gid
Check user ' s permissions of a file relative to a directory file descriptor TODO : check permissions based on uid / gid
&self
dirfd
FileDesc
path
UserInPtr<u8>
mode
usize
flags
usize
&self
dirfd
FileDesc
path
UserInPtr<u8>
mode
usize
flags
usize