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

Initial code for reporting fake fs size as suggested in #32 #34

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Harvie
Copy link

@Harvie Harvie commented May 5, 2016

Hello, this is first step for size limiting ( #32 )

@mpartel
Copy link
Owner

mpartel commented May 5, 2016

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.
Thanks!

@@ -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
Copy link
Owner

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.

@Harvie
Copy link
Author

Harvie commented Aug 3, 2016

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...

@mpartel
Copy link
Owner

mpartel commented Aug 13, 2016

Is there a use case for just this part? I'd rather not merge it yet if not.

@Harvie
Copy link
Author

Harvie commented Feb 26, 2017

@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.

@mpartel
Copy link
Owner

mpartel commented Sep 2, 2021

Sorry I forgot to get back to you .. over 4 years ago 😳 🤦‍♂️
I'd still like a more concrete description of a use-case before merging something like this. How exactly would this be used to debug a program? If it's only "does the program correctly process what df returns", that can be accomplished more cleanly (IMO) with a loopback mount.

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

Successfully merging this pull request may close these issues.

2 participants