Repository navigation
AppImage helper: pipe the backend archive to the root script - #20
Merged
Merged
Conversation
Root cannot read the user's FUSE mount of the AppImage, not even through a
file descriptor the user opened before pkexec: reading stdin failed with
"Permission denied", the script got an empty archive and live-usb-maker
never started ("Error encountered in the LiveUSB creation process").
The helper now reads backend.tar.gz itself as the user and writes it to the
script's stdin through a pipe. Copy to a root-owned directory, hash check
and extraction are unchanged.
|
Thanks! I pulled and rebuilt the AppImage |
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.
The AppImage could not create a LiveUSB when started normally (FUSE mount + pkexec): "Error encountered in the LiveUSB creation process".
Cause: the helper opened
backend.tar.gzbefore pkexec and passed it as stdin (setStandardInputFile). FUSE checks the reading process on every read, and the user's mount (noallow_other) refuses root even on a file descriptor the user opened.catin the root script got "Permission denied", the archive was empty,set -eustopped the script.Reproduced with:
Not visible in the build check (
helper exec live-usb-maker --helpruns without pkexec), with--appimage-extract, or when started with sudo.Fix: the helper reads the archive itself as the user and writes it to the script's stdin through a pipe. The rest is unchanged (root-owned work directory, sha256 check, extraction). Comment added at
cat.Tested: AppImage built with make-appimage.sh and started normally in a VM (FUSE mount + pkexec): LiveUSB written from an ISO and as a clone, both OK (before: "Error encountered" in both cases).