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
cmd/snap-confine: re-associate with pid-1 mount namespace if required #2624
Merged
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
64b5c45
Re-associate with pid-1 mount namespace if required
zyga c9c7948
Merge remote-tracking branch 'sc/reassociate-fix' into reassociate-fix
zyga f751c2d
cmd/snap-confine: tweak code layout
zyga 7699614
cmd/snap-confine: don't use O_PATH fd with setns (doh)
zyga c2fd22e
tests: overlay new snap-confine and snap-discard-ns into core snap
zyga 0dc3547
tests: show a tail of kernel log when reassociate test fails
zyga 2c39055
tests: add regression test for LP: #1644439
zyga bac294e
cmd/snap-confine: fix formatting
zyga b2885de
tests: add extra debugging
zyga ed63b5d
tests: tweak reassociate test to use debug kernel
zyga 64d5066
Merge branch 'master' of github.com:snapcore/snapd into reassociate-fix
zyga fcf991f
tests: collect more data about the apparmor/kernel bug
zyga 7525717
tests: fix typo
zyga 3707fa0
tests: collect more debug logs
zyga 52d5268
tests: wrap long line
zyga b00cd51
tests: switch to v2 test kernel
zyga 9695313
tests: fix log file redirection
zyga 82b1d40
Merge branch 'master' of github.com:snapcore/snapd into reassociate-fix
zyga b2c4377
Merge branch 'master' of github.com:snapcore/snapd into reassociate-fix
zyga dcc2fe5
cmd: add missing space
zyga 1bc3b85
tests: use more recent kernel from jj
zyga f0e0188
tests: add FIXME note
zyga 3771236
tests: don't install custom kernel for reassociate fix
zyga b3b2723
tests: fix wording
zyga 0870c41
cmd/snap-confine: document why we reassociate with pid1 ns
zyga 3caa47c
Merge branch 'master' of github.com:snapcore/snapd into reassociate-fix
zyga 61cb05b
Merge branch 'master' of github.com:snapcore/snapd into reassociate-fix
zyga 03da7ae
Merge remote-tracking branch 'upstream/master' into HEAD
mvo5 27f30d5
Merge master.
niemeyer 1ed5c44
cmd/snap-confine: remove redundant getenv
zyga a8d74c5
cmd/snap-confine: tighten ptrace rule (thanks to Tyler Hicks)
zyga 3efbedd
cmd/snap-confine: remove capability sys_ptrace
zyga 7373ee8
Revert "cmd/snap-confine: remove capability sys_ptrace"
zyga 390afad
tests: run 1644439 regression test as user as well
zyga 9074769
tests: display kernel version if 1644439 regression test fails
zyga 384ce39
tests: disable regression test for 1644439 on core systems
zyga c49b78b
Merge branch 'master' of github.com:snapcore/snapd into reassociate-fix
zyga
Jump to file or symbol
Failed to load files and symbols.
Viewing a subset of changes. View all
Revert "cmd/snap-confine: remove capability sys_ptrace"
This reverts commit 3efbedd. It seems that after all it is needed. Specifically if snap-confine is started by a non-root user everything consistently fails with: cannot perform readlinkat() on the mount namespace file descriptor of the init process: Permission denied And an apparmor denial is logged: [34345.780067] audit: type=1400 audit(1489647627.003:150): apparmor="DENIED" operation="capable" profile="/usr/lib/snapd/snap-confine" pid=31109 comm="snap-confine" capability=19 capname="sys_ptrace" This corresponds to the following call: if (readlinkat(init_mnt_fd, "", init_buf, sizeof init_buf) < 0) { init_mnt_fd is coming from and earlier successful call: init_mnt_fd = open("/proc/1/ns/mnt", O_RDONLY | O_CLOEXEC | O_NOFOLLOW | O_PATH); Perhaps the fact that euid == 0 but uid != 0 is relevant here but I don't know how exactly. Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
- Loading branch information...
commit 7373ee8938cebb82c88f5925d448b290d18a7122
zyga
committed
Mar 16, 2017