Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for setting UID/GID through mount options #62

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Merge branch 'master' into uid_gid_options
  • Loading branch information
a-wai authored Oct 11, 2018
commit 6bee74476fcffebf639a773af71433accd13f18c
9 changes: 7 additions & 2 deletions apfsfuse/ApfsFuse.cpp
Original file line number Diff line number Diff line change
@@ -108,9 +108,14 @@ static bool apfs_stat_internal(fuse_ino_t ino, struct stat &st)
st.st_mode = rec.mode;
// st.st_nlink = rec.ino.refcnt;
st.st_nlink = 1;

// st.st_uid = rec.owner;
// st.st_gid = rec.group;
st.st_uid = g_uid;
st.st_gid = g_gid;
// st_rdev?
st.st_uid = g_gid;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That can't be right. Did you mean to set st.st_gid?


if (rec.optional_present_flags & ApfsDir::Inode::INO_HAS_RDEV)
st.st_rdev = rec.rdev;

if (S_ISREG(st.st_mode))
{
You are viewing a condensed version of this merge commit. You can view the full changes here.