mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-26 02:43:24 +00:00
Add support for group-based permission checking in ext2
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
6cea8d2a8c
commit
e75b6320ad
@ -18,7 +18,7 @@ use super::{
|
||||
};
|
||||
use crate::{
|
||||
fs::utils::{Extension, FallocMode, InodeMode, Metadata},
|
||||
process::{Gid, Uid},
|
||||
process::{posix_thread::AsPosixThread, Gid, Uid},
|
||||
};
|
||||
|
||||
/// Max length of file name.
|
||||
@ -2075,11 +2075,12 @@ impl TryFrom<RawInode> for InodeDesc {
|
||||
impl InodeDesc {
|
||||
pub fn new(type_: InodeType, perm: FilePerm) -> Dirty<Self> {
|
||||
let now = now();
|
||||
let credentials = current_thread!().as_posix_thread().unwrap().credentials();
|
||||
Dirty::new_dirty(Self {
|
||||
type_,
|
||||
perm,
|
||||
uid: 0,
|
||||
gid: 0,
|
||||
uid: credentials.fsuid().into(),
|
||||
gid: credentials.fsgid().into(),
|
||||
size: 0,
|
||||
atime: now,
|
||||
ctime: now,
|
||||
|
Reference in New Issue
Block a user