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

Needs Casper bindings #26

Closed
asomers opened this issue Dec 2, 2022 · 3 comments
Closed

Needs Casper bindings #26

asomers opened this issue Dec 2, 2022 · 3 comments
Assignees

Comments

@asomers
Copy link
Collaborator

asomers commented Dec 2, 2022

Capsicum's model is to block access to global namespaces. But important operations like gethostbynbame and sysctlbyname operate on global namespaces only. So to sandbox that, Capsicum uses the technique of privilege separation. Through libcasper(3) it forks child processes to deal with stuff like that. We should provide bindings for libcasper and the most important casper services. I've already got a start on this.

@asomers asomers self-assigned this Dec 2, 2022
@dlrobertson
Copy link
Owner

From johalun/sysctl-rs#59 (comment):

Well, nobody will ever use libcasper without using capsicum. There are, however, plenty of use cases for capsicum that don't require libcasper. But shorn of its services, libcasper is pretty small. IMHO it doesn't require a standalone crate. What about adding it to capsicum-rs, but gated by a feature flag?

Thanks for the explanation. I've only ever used capsicum (I recognize that that's a bit weird 😆). I think a feature flag makes a lot of sense, but it's probably worthwhile to add it to the default-features?

Moving discussion here to avoid cluttering johalun/sysctl-rs#59

@asomers
Copy link
Collaborator Author

asomers commented Jan 12, 2023

I don't think we should put it in default-features, because that will link libcasper.so into applications that don't need it. See #35 for the implementation.

@asomers
Copy link
Collaborator Author

asomers commented Feb 11, 2023

Fixed in #35 .

@asomers asomers closed this as completed Feb 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants