Skip to content

modif: improve error messages in mountinfo.c #6711

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

Merged
merged 1 commit into from
Apr 19, 2025

Conversation

kmk3
Copy link
Collaborator

@kmk3 kmk3 commented Apr 16, 2025

Currently when a line from /proc/self/mountinfo is too long, firejail
exits with an unclear error message:

Error: cannot read /proc/self/mountinfo

So reword it and include the maximum line length and the offending line:

Error: /proc/self/mountinfo line is too long and may be truncated (4095 >= 4095): [...]

Improve other error messages in mountinfo.c as well.

Relates to #6450.

@kmk3 kmk3 added the modif This modifies existing behavior label Apr 16, 2025
@kmk3 kmk3 force-pushed the improve-mountinfo-errors branch from 92dceb5 to 4b46f72 Compare April 16, 2025 06:36
@kmk3 kmk3 changed the title modif: improve error messages in mountinfo.c modif: improve error/debug messages in mountinfo.c Apr 16, 2025
@kmk3 kmk3 marked this pull request as draft April 16, 2025 07:28
@kmk3 kmk3 force-pushed the improve-mountinfo-errors branch from 4b46f72 to ee73708 Compare April 16, 2025 09:30
@kmk3 kmk3 changed the title modif: improve error/debug messages in mountinfo.c modif: improve error messages in mountinfo.c Apr 16, 2025
@kmk3 kmk3 marked this pull request as ready for review April 16, 2025 09:31
@kmk3 kmk3 force-pushed the improve-mountinfo-errors branch from ee73708 to 87eb450 Compare April 17, 2025 12:42
Currently when a line from /proc/self/mountinfo is too long, firejail
exits with an unclear error message:

    Error: cannot read /proc/self/mountinfo

So reword it and include the maximum line length and the offending line:

    Error: /proc/self/mountinfo line is too long and may be truncated (4095 >= 4095): [...]

Improve other error messages in mountinfo.c as well.

Relates to netblue30#6450.
@kmk3 kmk3 force-pushed the improve-mountinfo-errors branch from 87eb450 to aaffd2b Compare April 17, 2025 12:55
@kmk3 kmk3 merged commit 2f8e12d into netblue30:master Apr 19, 2025
12 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in Release 0.9.76 Apr 19, 2025
@kmk3 kmk3 deleted the improve-mountinfo-errors branch April 19, 2025 15:25
kmk3 added a commit that referenced this pull request Apr 21, 2025
@kmk3 kmk3 moved this from Done to Done (on RELNOTES) in Release 0.9.76 Apr 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
modif This modifies existing behavior
Projects
Status: Done (on RELNOTES)
Development

Successfully merging this pull request may close these issues.

1 participant