Repository navigation
filesystem: refuse to mount over the extracted initrd - #86
Merged
Merged
Conversation
mount.sh -i extracts initrd.cpio into filesystem/work/p1, the mountpoint of the boot partition. A deploy run before umount.sh -i mounted p1 over that tree, and its unmount then ran `rm -rf` on p1: the user's edit was deleted, umount.sh -i found nothing to repack, and nothing said so. __do_fs_mount now refuses a p1 or p2 that is not mounted but has content, and names umount.sh -i when the initrd's fakeroot state sits next to it. The unmount removes only an empty mountpoint, with rmdir, and leaves a directory with content in place with a warning, since the deploy's cleanup runs after a refused mount too.
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.
A deploy run between
mount.sh -iandumount.sh -imounted the boot partition over the extracted initrd infilesystem/work/p1, and its unmount ranrm -rfon p1: the edit was gone andumount.sh -ifound nothing to repack.__do_fs_mountnow refuses a p1/p2 that is not mounted but has content (pointing toumount.sh -iwhenp1.fakerootis there), and__do_main_umountremoves only an empty mountpoint, withrmdir. Checked by running both functions out of the classes against a temp tree with stubbed sudo: the extracted tree withp1.fakerootis refused with the umount.sh -i hint, the following cleanup keeps the edit and thefilesystem/p1link, a stray non-empty p1 gets the generic refusal, and an empty p2 is still removed.bitbake -pparses clean ininfrabase-build:1.0.