1

I built two applications using snapcraft(say snap1 and snap2) with confinement as devmode.

snap1 is a simple daemon application which starts snap2(not a daemon) and both work normally.

I’m developing for Dell Edge Gateway device with Ubuntu core-16 on it.

Now for security purpose I have to change the confinement of both these snaps to strict confinement and build again. But after this modification,

  • snap1 is unable to start snap2.
  • snap2 is unable to open port or read data from serial-port-ioioix

However I’m able to access network via the applications after the following changes.

I have done following changes for snap1 and snap2 in their respective yaml files:

1. snap1.yaml

name: snap1 
version: ‘0.8’
summary: This is a snap1
description: |
 Some description.
grade: stable #devel # must be ‘stable’ to release into candidate/stable channels
confinement: strict #devmode # use ‘strict’ once you have the right plugs and slots

apps:
 snap1:
 command: bin/snap1
 plugs:
 - network
 - network-bind
 - home
 - removable-media
 - shutdown
 - snapd-control
 - daemon-notify
 - system-trace
 - timezone-control
 daemon: simple
parts:
 snap1-app:
 plugin: cmake
 configflags:
 - -DAPPVERSION=0.8
 source: .

2. snap1.yaml

name: snap2
version: ‘1.0.7’ 
summary: This is a snap2
description: |
 Some description.
grade: stable #devel # must be ‘stable’ to release into candidate/stable channels
confinement: strict #devmode # use ‘strict’ once you have the right plugs and slots

apps:
 snap2:
 command: bin/snap2
 plugs:
 - network
 - network-bind
 - home
 - removable-media
 - serial-port
 - raw-usb
 - io-ports-control
 - gpio
parts:
 snap2-app:
 plugin: cmake
 configflags:
 - -DBUILDFROMSNAP=TRUE
 - -DAPPVERSION=1.0.7
 source: .

Please let me know if any other change is to be done.

– Thanks in advance… :) :+1:

0

You must log in to answer this question.

Browse other questions tagged .