Enable snap-confine namespace sharing #134

Closed
wants to merge 8 commits into
from

Conversation

Projects
None yet
1 participant
Collaborator

zyga commented Sep 12, 2016

This branch changes mount-support.[ch] a little so that there's no
explicit unshare API anymore (this is handled by ns-support.h) and so
that mount-suppor.h is really just about populating the namespace that
is already provided.

In addition, sc-main.c now uses SNAP_NAME to join or create a namespace
group and if populates it if necessary. The apparmor profile is updated
to let snap-confine perform the additional tasks.

Signed-off-by: Zygmunt Krynicki zygmunt.krynicki@canonical.com

Collaborator

zyga commented Sep 12, 2016

I'll close this for now and reopen once #135 lands

@zyga zyga closed this Sep 12, 2016

@zyga zyga reopened this Sep 12, 2016

zyga added some commits Sep 8, 2016

Enable snap-confine namespace sharing
This patch changes mount-support.[ch] a little so that there's no
explicit unshare API anymore (this is handled by ns-support.h) and so
that mount-suppor.h is really just about populating the namespace that
is already provided.

In addition, sc-main.c now uses SNAP_NAME to join or create a namespace
group and if populates it if necessary. The apparmor profile is updated
to let snap-confine perform the additional tasks.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
Discard snapd-hacker-toolbelt namespaces on restore
Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
Use restore-each to cleanup mount namespaces
Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
Allow snap-discard-ns to fail
Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
Chdir to original directory after setns()
Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
Fix apparmor profile
Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
Allow forked process to be killed by the parent
Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
Collaborator

zyga commented Sep 13, 2016

I'll close this until all the tests run in qemu

@zyga zyga closed this Sep 13, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment