Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
Don't expose /etc/alternatives from the host #50
Merged
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
dc71037
Don't expose /etc/alternatives from the host
zyga 944fe32
Merge branch 'master' of github.com:ubuntu-core/snap-confine into fix…
zyga 15d819d
Merge remote-tracking branch 'origin/master' into fix-etc-alternatives
zyga e16bbf4
Update comments per code review
zyga
Jump to file or symbol
Failed to load files and symbols.
| @@ -0,0 +1,15 @@ | ||
| +summary: Regression check for https://bugs.launchpad.net/snap-confine/+bug/1580018 | ||
| +# This is blacklisted on debian because we first have to get the dpkg-vendor patches | ||
| +systems: [-debian-8] | ||
| +execute: | | ||
| + cd / | ||
| + echo "Having installed the snapd-hacker-toolbelt snap" | ||
| + snap list | grep -q snapd-hacker-toolbelt || snap install snapd-hacker-toolbelt | ||
| + | ||
| + echo "We can check the inode number of /etc/alternatives" | ||
| + host_inode="$(stat -c '%i' /etc/alternatives)" | ||
| + core_inode="$(stat -c '%i' /snap/ubuntu-core/current/etc/alternatives)" | ||
| + effective_inode="$(/snap/bin/snapd-hacker-toolbelt.busybox stat -c '%i' /etc/alternatives)" | ||
| + echo "The inode number as seen from a confined snap should be that of the /etc/alternatives from the core snap" | ||
| + [ "$host_inode" != "$core_inode" ] | ||
| + [ "$effective_inode" = "$core_inode" ] |