diff --git a/fs/proc/include/proc_fs.h b/fs/proc/include/proc_fs.h index c519db91..ed1f6fcb 100644 --- a/fs/proc/include/proc_fs.h +++ b/fs/proc/include/proc_fs.h @@ -89,6 +89,8 @@ struct ProcFileOperations { }; struct ProcDirEntry { + uint uid; + uint gid; mode_t mode; int flags; const struct ProcFileOperations *procFileOps; diff --git a/fs/proc/os_adapt/proc_vfs.c b/fs/proc/os_adapt/proc_vfs.c index 00cfb7ac..7cabbaf9 100644 --- a/fs/proc/os_adapt/proc_vfs.c +++ b/fs/proc/os_adapt/proc_vfs.c @@ -60,11 +60,9 @@ static struct Vnode *EntryToVnode(struct ProcDirEntry *entry) node->fop = &g_procfsFops; node->data = entry; node->type = entry->type; - if (node->type == VNODE_TYPE_DIR) { - node->mode = S_IFDIR | PROCFS_DEFAULT_MODE; - } else { - node->mode = S_IFREG | PROCFS_DEFAULT_MODE; - } + node->uid = entry->uid; + node->gid = entry->gid; + node->mode = entry->mode; return node; }