-
Notifications
You must be signed in to change notification settings - Fork 37
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
Minimize snap staging and restricted fallback editors (5.0-edge) #251
Merged
tomponline
merged 11 commits into
canonical:5.0-edge
from
simondeziel:minimize-snap-stage-5.0-edge
Jan 2, 2024
Merged
Minimize snap staging and restricted fallback editors (5.0-edge) #251
tomponline
merged 11 commits into
canonical:5.0-edge
from
simondeziel:minimize-snap-stage-5.0-edge
Jan 2, 2024
Conversation
This file contains 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
Signed-off-by: Simon Deziel <[email protected]>
Signed-off-by: Simon Deziel <[email protected]>
Also add logic to both nano (builtin) and vim.tiny (from the base coreXX) to ignore any unreadable rc file. Signed-off-by: Simon Deziel <[email protected]>
Signed-off-by: Simon Deziel <[email protected]>
…lbacks While this is a weak security guard rail, it prevents the user from using the builtin editor to enter the snap's confined environment: ``` $ EDITOR=foo lxc config edit # causes the fallback to vim.tiny from core !bash # gives shell access inside the snap confined env ``` From the outside it would look like: ``` root 6784 0.3 1.6 1538936 16908 pts/0 Sl 18:09 0:00 \_ /snap/lxd/x1/bin/lxc config edit root 6808 0.1 0.4 6112 4448 pts/0 S 18:09 0:00 \_ vim.tiny /tmp/lxd_editor_3106750297.yaml root 6816 0.0 0.3 5044 3904 pts/0 S+ 18:09 0:00 \_ bash ``` With the restricted mode, vim would refuse to shell out with: > E145: Shell commands and some functionality not allowed in rvim Similarly with nano (make sure there is no nano in the host): ``` $ lxc config edit Ctrl-t + ps faux ``` In restricted mode, nano would refuse with: > [ This function is disabled in restricted mode ] Signed-off-by: Simon Deziel <[email protected]>
Signed-off-by: Simon Deziel <[email protected]>
It contained include headers and other files from spice. Signed-off-by: Simon Deziel <[email protected]>
Signed-off-by: Simon Deziel <[email protected]>
Signed-off-by: Simon Deziel <[email protected]>
Signed-off-by: Simon Deziel <[email protected]>
Signed-off-by: Simon Deziel <[email protected]>
simondeziel
force-pushed
the
minimize-snap-stage-5.0-edge
branch
from
December 15, 2023 22:17
8e96314
to
bac2f47
Compare
tomponline
approved these changes
Jan 2, 2024
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.
Backport of #224, #237, #245 (follow-up fix) and #252 (not yet merged in
latest-edge
).This ensures
vim
is provided by thecore20
base and also shrinks the snap size from 112MiB to 86MiB due to the additional stripping. Most of the size saving is due to stripping QEMU bits:This also supersedes #248.
The locally built snap worked fine.