interfaces,tests: skip unknown plug/slot interfaces (2.29) #4228

Merged
merged 1 commit into from Nov 16, 2017

Conversation

Projects
None yet
4 participants
Contributor

zyga commented Nov 15, 2017

This patch changes the Repository.AddSnap method to skip unknown
interfaces when adding constituent plugs and slots. This regression
happened because the repository no longer validates the snap, assuming
the loader did. The loader did notice but did not remove the offending
interfaces.

As it is unclear what should happen, this patch implements a minimal
solution to prevent snapd from crashing on nil interface.

Fixes: https://bugs.launchpad.net/snappy/+bug/1732555
Signed-off-by: Zygmunt Krynicki zygmunt.krynicki@canonical.com

interfaces,tests: skip unknown plug/slot interfaces
This patch changes the Repository.AddSnap method to skip unknown
interfaces when adding constituent plugs and slots. This regression
happened because the repository no longer validates the snap, assuming
the loader did. The loader did notice but did not remove the offending
interfaces.

As it is unclear what should happen, this patch implements a minimal
solution to prevent snapd from crashing on nil interface.

Fixes: https://bugs.launchpad.net/snappy/+bug/1732555
Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

@zyga zyga added the Critical label Nov 15, 2017

@zyga zyga added this to the 2.29 milestone Nov 15, 2017

codecov-io commented Nov 16, 2017

Codecov Report

Merging #4228 into release/2.29 will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@               Coverage Diff               @@
##           release/2.29   #4228      +/-   ##
===============================================
+ Coverage         75.58%   75.6%   +0.02%     
===============================================
  Files               433     433              
  Lines             37266   37270       +4     
===============================================
+ Hits              28166   28177      +11     
+ Misses             7128    7122       -6     
+ Partials           1972    1971       -1
Impacted Files Coverage Δ
interfaces/repo.go 97.66% <100%> (+0.01%) ⬆️
cmd/snap-seccomp/main.go 54.21% <0%> (+2.81%) ⬆️

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 93de684...53c2779. Read the comment docs.

@zyga zyga changed the title from interfaces,tests: skip unknown plug/slot interfaces to interfaces,tests: skip unknown plug/slot interfaces (2.29) Nov 16, 2017

mvo5 approved these changes Nov 16, 2017

@stolowski stolowski merged commit 1c1966a into snapcore:release/2.29 Nov 16, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@zyga zyga deleted the zyga:backport/lp-1732555 branch Nov 16, 2017

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