cmd: select what socket to use in cmd/snap{,ctl} #3098

Merged
merged 6 commits into from Mar 29, 2017

Conversation

Projects
None yet
5 participants
Collaborator

mvo5 commented Mar 28, 2017

So far we relied on apparmor to figure out what snap socket we
can use. However this fails on distributions without apparmor
support. Here the snapctl code tries to open the snapd.socket and is
successful - when instead if should talk to the snapd-snap.socket.

This should also fix https://bugs.launchpad.net/snapd/+bug/1675812,
at least the confusing apparmor denial from snapctl.

Select what socket to use in cmd/snap{,ctl}
So far we relied on apparmor to figure out what snap socket we
can use. However this fails on distributions without apparmor
support.

zyga approved these changes Mar 28, 2017

woah, this looks really nice mvo :-)

@mvo5 mvo5 added this to the 2.23.6 milestone Mar 28, 2017

@pedronis pedronis changed the title from cmd: Select what socket to use in cmd/snap{,ctl} to cmd: select what socket to use in cmd/snap{,ctl} Mar 28, 2017

looks reasonable to me, at least as an interim solution

Contributor

jdstrand commented Mar 28, 2017

Thank you for this! Can you refer to https://bugs.launchpad.net/snapd/+bug/1675812 since this should fix the noisy denial in that bug? +1 on the approach (I didn't do an in depth code review).

Contributor

morphis commented Mar 29, 2017

LGTM!

@mvo5 mvo5 requested review from niemeyer and kyrofa Mar 29, 2017

lgtm, seems also the correct thing because of now DisableAuth: true

mvo5 added some commits Mar 29, 2017

mvo5 added some commits Mar 29, 2017

@mvo5 mvo5 merged commit 3505b6a into snapcore:master Mar 29, 2017

2 of 6 checks passed

xenial-amd64 autopkgtest running
Details
xenial-i386 autopkgtest running
Details
xenial-ppc64el autopkgtest running
Details
yakkety-amd64 autopkgtest running
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
zesty-amd64 autopkgtest finished (success)
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment