Initial code for reporting fake fs size as suggested in #32#34
Initial code for reporting fake fs size as suggested in #32#34Harvie wants to merge 2 commits intompartel:masterfrom
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. |
| 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.
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 )