Closed svenin closed 8 years ago
Can one of the admins verify this patch?
Thanks for the patch. Two issues with it:
Done.
looking at the code again I see a simpler/nicer solution. The VirtualFileSystem#create already takes Subject as an argument. You can update v3 code to create a new subject if farrd3 contains uid and gid. Inside PseudoFs@create you can check that effective uid is root and pass provided subject to underling filesystem. I thinks it's cleaner. What do you think?
Note that this applies to both create and mkdir. So you are suggesting:
No problem, will do that.
Updated the PR, let me know what you think.
Done.
ok to test.
Thanks!
Thank you!
This originates form using SimpleNfsServer in https://github.com/kofemann/simple-nfs to implement a local nfs server to test an nfs v3 client application. Our client was doing a directory creation as root, but was sending different uid and gid for the directory creation. The SimpleNfsServer ignored that and created the directory with root uid and gid. I tracked the root cause to PseudoFs ignoring the attributes received on creation. The suggested fix is prettry simple but maybe I am optimistic here and a more general solution is needed here. Let me know what you think. One thing is that I am not sure this should be allowed to all users, maybe only root, I can add that check if needed.