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

cloudabi-reexec needs to support dropping fd rights #5

Open
m-ou-se opened this issue Dec 26, 2018 · 1 comment
Open

cloudabi-reexec needs to support dropping fd rights #5

m-ou-se opened this issue Dec 26, 2018 · 1 comment

Comments

@m-ou-se
Copy link
Member

m-ou-se commented Dec 26, 2018

cloudabi-run (running in the Posix world) can't set all Capsicum rights properly on the file descriptors it opens. It'll have to ask cloudabi-reexec (running in the CloudABI world) to disable some rights on the file descriptors it gets, if that was originally specified in the Yaml file.

Right now, cloudabi-exec takes an argdata sequence of two items: The file descriptor of the executable to run, and the argdata to provide to that program.

We could simply add an (optional) third item to that sequence, which describes what rights the file descriptors should have. This could be a map, mapping file descriptors to a 2-tuple (sequence) containing (fs_rights_base, fs_rights_inheriting), both as integers.

@EdSchouten
Copy link
Member

Yes, that sounds like a very good thing to have.

Maybe, while we're at it, we should consider replacing the sequence by a full map with string keys. Fair chance we want to add even more features over time.

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

No branches or pull requests

2 participants