diff options
-rw-r--r-- | sys/fs/tmpfs.c | 1 | ||||
-rw-r--r-- | sys/include/fs/tmpfs.h | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/sys/fs/tmpfs.c b/sys/fs/tmpfs.c index 5f8e531..895e1fa 100644 --- a/sys/fs/tmpfs.c +++ b/sys/fs/tmpfs.c @@ -212,6 +212,7 @@ tmpfs_create(struct vop_create_args *args) np->dirvp = dirvp; np->type = TMPFS_REG; np->real_size = 0; + np->mode = 0700; memcpy(np->rpath, pcp, strlen(pcp) + 1); TAILQ_INSERT_TAIL(&root_np->dirents, np, link); diff --git a/sys/include/fs/tmpfs.h b/sys/include/fs/tmpfs.h index ca24060..acb5256 100644 --- a/sys/include/fs/tmpfs.h +++ b/sys/include/fs/tmpfs.h @@ -55,6 +55,7 @@ struct tmpfs_node; * @len: Length of buffer * @real_size: Actual size of file * @data: The backing file data + * @mode: File permissions * @dirvp: Vnode of the parent node * @vp: Vnode of the current node * @lock: Lock protecting this node @@ -65,6 +66,7 @@ struct tmpfs_node { size_t len; size_t real_size; void *data; + mode_t mode; struct vnode *dirvp; struct vnode *vp; struct spinlock lock; |