Skip to content

Turbo ACL Bug Fix#313

Open
DevanshG1 wants to merge 2 commits into
mainfrom
personal/degoswami/ACL-Fix
Open

Turbo ACL Bug Fix#313
DevanshG1 wants to merge 2 commits into
mainfrom
personal/degoswami/ACL-Fix

Conversation

@DevanshG1

Copy link
Copy Markdown
Collaborator

Since the turbo client runs as a FUSE demon, it has a uid=0. When root squash is enabled, even though sattr3 has the correct uid/gid, it is not honored and the uid used is 0. To fix this i have called the setuid and setguid functions before each RPC dispatch

@linuxsmiths linuxsmiths left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LG o/w

Comment thread turbonfs/inc/rpc_task.h
Comment on lines +2155 to +2156
nfs_set_uid(nfs, ctx->uid);
nfs_set_gid(nfs, ctx->gid);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

you may also want to set the supplementary groups for complete permission sanity, o/w some permissions granted via supplementary groups may not work.
Do check what supplementary groups are being sent in the RPC.

Comment thread turbonfs/src/rpc_task.cpp

do {
rpc_retry = false;
set_caller_credentials();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

the change to set the uid/gid in the RPC, from the fuse ctx is correct, just make sure you do it for all NFS command and none get missed out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants