-
Notifications
You must be signed in to change notification settings - Fork 56
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
POSIX ACL support? #39
Comments
I will try to get a test set up this weekend, but I think this was working a while back. Regardless of what's working or not now in 9P/v9fs/diod's handling of the ACL attributes, the diod server should definitely not be able to circumvent local access controls. That the most worrisome part of your issue so I'll look at that first. Could you provide:
Thanks! |
Sure! To clarify, I'm mounting the filesystem as root and then accessing it as a different user. I don't think it would be unreasonable for the client to be responsible for access enforcement in this case, it's just not what I was expecting from reading the documentation.
|
Thanks. Still haven't had time to start on this, but one detail that might be important - are the uid and gid mappings and supplemental group memberships the same on client and server? As I recall 9p2000.u passes the primary uid and gid over the wire (not the names), so that the diod server would setfsuid/gid to the client's numerical id's whether or not those are valid or consistent on the server. I need to refresh my memory on how the server deals with supplemental groups, but again it's probably based on group membership on the server starting with the client primary uid, not a list of groups passed in from the client? |
Yes. /etc/passwd and /etc/group are identical. (I thought from the I did some more Googling and experimentation, this morning, and I discovered that if I pass both |
Sorry, taking me a bit to refresh my memory here. One important point I had forgotten: if the client connection is authenticated as root (and other options are not set such as As an aside, when you change your primary group and create a file, your gid is actually being passed in the With the I think So, possibly we just need to make the change that you already made to diodmount to allow that mode to be used as an alternative to |
Ah, okay. I didn't realize Diod used |
No, I appreciate you bringing it up as it sounds like we do need to make accommodations for |
The code seems to suggest that both Diod and the v9fs driver support POSIX ACLs, but I can figure out how to properly get them to work. On the remote machine,
ls -l
identifies the files in question as having ACLs, and getfacl correctly reports them, but they seem to be completely ignored as far as file accesses are concerned.On files where the ACL grants access but traditional unix permissions wouldn't, I get
Permission denied
errors. On files where the ACL should deny access but traditional unix permissions would grant it, I can successfully read the contents of the file. (The latter especially surprised me, as the user definitely cannot read the file in question locally, and I would have expected Diod's use of setfs[ug]id to prevent access even if the client machine were ignoring ACLs.)I have CONFIG_9P_FS_POSIX_ACL enabled in the client kernel, and I tried adding -o posixacl to my diodmount command without any apparent effect.
Am I missing a step somewhere, or is this not supported?
Thanks.
The text was updated successfully, but these errors were encountered: