Repository navigation
Silence lseek() errors on fds inherited by extra-data helpers - #6609
Merged
Merged
Conversation
Now that we're passing the app's /app and /usr down to bwrap as O_PATH file descriptors, it will be even more common to have non-seekable fds in the array. Signed-off-by: Simon McVittie <[email protected]>
This is functionally equivalent to the local child_setup() deleted by this commit, except that it ignores lseek() errors, which can legitimately happen when inheriting a non-seekable file descriptor. Since commit ac62ebe "run: Use O_PATH fds for the runtime and app deploy directories", any extra-data helper that runs inside a runtime will receive a non-seekable O_PATH fd as its /usr. Resolves: flatpak#6608 Signed-off-by: Simon McVittie <[email protected]>
smcv
marked this pull request as ready for review
April 11, 2026 16:12
Collaborator
Author
|
cc @bertogg |
bbhtt
approved these changes
Apr 12, 2026
Contributor
|
Looks good to me, thanks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
bwrap: Clarify a comment
Now that we're passing the app's /app and /usr down to bwrap as O_PATH
file descriptors, it will be even more common to have non-seekable fds
in the array.
dir: Use flatpak_bwrap_child_setup_inherit_fds_cb() to apply extra-data
This is functionally equivalent to the local child_setup() deleted by
this commit, except that it ignores lseek() errors, which can
legitimately happen when inheriting a non-seekable file descriptor.
Since commit ac62ebe "run: Use O_PATH fds for the runtime and app
deploy directories", any extra-data helper that runs inside a runtime
will receive a non-seekable O_PATH fd as its /usr.
Resolves: [Bug]: "lseek error in child setup" while installing extra-data in 1.16.4+ #6608