Skip to content
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

c/libsnap-confine-private, interfaces: account for reexec on arch #14682

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

andrewphelpsj
Copy link
Member

On arch, snap-confine's security tag will be prefixed with /var/lib/snapd. This change accounts for that, allowing us to use SNAP_REEXEC on arch systems.

Additionally, the fix in interfaces allows us to account for where snaps are installed on non-ubuntu systems.

Copy link
Contributor

@zyga zyga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took a while to look at the various elements and consequences and this is good and fixes an actual issue on Fedora/Arch like distributions.

Nice!

@andrewphelpsj andrewphelpsj added the Needs security review Can only be merged once security gave a :+1: label Nov 1, 2024
Copy link
Contributor

@bboozzoo bboozzoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -274,7 +274,7 @@ func SystemKeyMismatch(extraData SystemKeyExtraData) (bool, error) {
if mockedSystemKey == nil {
if exe, err := os.Readlink("/proc/self/exe"); err == nil {
// detect running local local builds
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// detect running local local builds
// detect running local builds

Copy link
Contributor

@alexmurray alexmurray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Copy link

codecov bot commented Nov 4, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 78.97%. Comparing base (96ea7b0) to head (ba2dd67).
Report is 35 commits behind head on master.

Files with missing lines Patch % Lines
interfaces/system_key.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #14682      +/-   ##
==========================================
+ Coverage   78.95%   78.97%   +0.02%     
==========================================
  Files        1084     1085       +1     
  Lines      146638   147148     +510     
==========================================
+ Hits       115773   116207     +434     
- Misses      23667    23717      +50     
- Partials     7198     7224      +26     
Flag Coverage Δ
unittests 78.97% <0.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

andrewphelpsj and others added 4 commits November 7, 2024 16:20
…be prefixed with /var/lib/snapd

This change accounts for that, allowing us to use SNAP_REEXEC on arch
systems.
… system specific dirs.SnapMountDir

This check was always failing on arch, since snaps are mounted under a
different location.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs security review Can only be merged once security gave a :+1:
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants