-
Notifications
You must be signed in to change notification settings - Fork 64
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
Initial code for reporting fake fs size as suggested in #32 #34
base: master
Are you sure you want to change the base?
Conversation
Cool! I'd rather wait for the whole feature to be complete in your branch before merging anything, so please continue developing on this PR. I don't mind if the PR grows large, and I'm happy to comment on intermediate steps if you'd like. |
@@ -173,6 +173,8 @@ static struct Settings { | |||
uid_t uid_offset; | |||
gid_t gid_offset; | |||
|
|||
long bindfs_size; //Maybe it should be unsigned in future, however right now i use -1 to signal it's not used |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
off_t
is probably appropriate here. It's signed, and since we compile with -D_FILE_OFFSET_BITS=64
it's also 64 bits.
Well i don't have time to code real limit right now as it would be quite complex piece. However it may be interesting to have this fake size merged anyway... |
Is there a use case for just this part? I'd rather not merge it yet if not. |
@mpartel sure. it can be used for cases where you want the client to clearly see that his resources are limited, but not crash if he gets behind the boundaries. also it can be used for debugging of other programs. |
Sorry I forgot to get back to you .. over 4 years ago 😳 🤦♂️ |
Hello, this is first step for size limiting ( #32 )