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

cmd/snap-confine: Ensure snap-confine is allowed to access os-release #4182

Merged
merged 2 commits into from
Nov 9, 2017

Conversation

ikeydoherty
Copy link
Contributor

This dupes the existing rule and fixes a regression on Solus where we
see a denial for the os-release file.

Signed-off-by: Ikey Doherty [email protected]

This dupes the existing rule and fixes a regression on Solus where we
see a denial for the os-release file.

Signed-off-by: Ikey Doherty <[email protected]>
@ikeydoherty
Copy link
Contributor Author

Relevant journal issue:

Nov 08 21:51:20 ironhide audit[1830]: AVC apparmor="DENIED" operation="open" profile="/usr/lib64/snapd/snap-confine" name="/etc/os-release" pid=1830 comm="snap-confine" requested_mask="r" denied_mask="r" fsuid=0 ouid=0

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.

+1

@zyga zyga added this to the 2.29 milestone Nov 9, 2017
@@ -213,6 +213,9 @@
umount /var/lib/snapd/hostfs/proc/,
mount options=(rw rslave) -> /var/lib/snapd/hostfs/,

# Allow reading the os-release file (possibly a symlink to /usr/lib).
/{etc/,usr/lib/}os-release r,
Copy link
Contributor

Choose a reason for hiding this comment

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

What puzzles me is why we did not notice this earlier, I think we have a missing (spread) test here :/

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.

+1

To explain why this was not caught before: this only affects core as the code in question assumes classic and only falls back to core if identified correctly (which didn't work).

On core treated as classic things will behave correctly because we will still set up the right mount namespace, just without reusing the boot layout.

The test relies on the "old" snapd-xdg-open deb package. However
with the promotion of snapd 2.28.5 into xenial-updates the pervious
snapd-xdg-open version 0.0.0~16.04 is no longer available to
download. This means we can not run the test. Disable for now
until we find a way to fix it.
@codecov-io
Copy link

codecov-io commented Nov 9, 2017

Codecov Report

Merging #4182 into master will increase coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4182      +/-   ##
==========================================
+ Coverage   75.53%   75.54%   +<.01%     
==========================================
  Files         436      436              
  Lines       37811    37805       -6     
==========================================
- Hits        28562    28559       -3     
+ Misses       7253     7251       -2     
+ Partials     1996     1995       -1
Impacted Files Coverage Δ
interfaces/kmod/kmod.go 100% <0%> (+27.27%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2baa20b...d9444a2. Read the comment docs.

@mvo5 mvo5 merged commit 941b6af into canonical:master Nov 9, 2017
@ikeydoherty
Copy link
Contributor Author

Ty for merge! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants