-
Notifications
You must be signed in to change notification settings - Fork 35
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
Add a UserDetail::read_only method #503
Conversation
If it returns True, then the storage backend should not allow any destructive operations. Implement this method in the cap-ftpd example for unftp-sbe-fs.
After authenticating a connection, limit the process's rights to mitigate any potential attacks.
Hi @asomers , terribly sorry for not answering you here. I saw this at some point but then forgot about it when life got busy. I don't think this is the right approach. Instead of adding readonly capabilities to each storage back-end individually, we should do it only once. This is what I am doing here: https://github.com/hannesdejager/unftp-sbe-restrict Can this be used for your purposes? The crate is here: https://crates.io/crates/unftp-sbe-restrict Let me know your thoughts. |
Functionally, I think it would work. It wouldn't provide capability-based security, though. The nice thing about this PR is that Capsicum guarantees that, after |
I think the capsicum code in Maybe I don't understand where you're going with that but at least it seems the addition of |
If UserDetail doesn't include read_only , then how would |
Right... I'm asleep after a long day. I have to think a bit on this... perhaps we need to bring the granularity of permissions that is implemented in unftp-sbe-restrict to libunftp itself i.e. have a |
That sounds like a good idea. |
If it returns True, then the storage backend should not allow any destructive operations. Implement this method in the cap-ftpd example for unftp-sbe-fs.
Also, use Capsicum within unftp-sbe-fs, on FreeBSD. After authenticating a connection, limit the process's rights to mitigate any potential attacks.