content interface behaves different if tried an operation before connecting the interface
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snappy |
New
|
Undecided
|
Unassigned |
Bug Description
I've got a wifi-connect snap which has an application using content interface to get use of wifi-ap exposed $SNAP_DATA/sockets directory.
Depending on the order of the steps I take, the behaviour of the app run is different resulting in denial or success:
CASE A:
STEPS:
1- have neither wifi-ap or wifi-connect snaps installed
2- install wifi-ap from store
3- install our wifi-connect snap in strict mode
snap install wifi-connect_
6- connect control interface
snap connect wifi-connect:
7- run
sudo wifi-connect.
8 got a denial in syslog traces and this response:
Error: '"/snap/
That makes sense as wifi-connect tries to mount content share in rw mode into $SNAP/snap/sockets which is read only
CASE B:
STEPS:
1- have neither wifi-ap or wifi-connect snaps installed
2- install wifi-ap from store
3- install our wifi-connect snap in strict mode
snap install wifi-connect_
4- run
sudo wifi-connect.
5- got a denial in syslog traces and this response:
Error: '"/snap/
6- connect control interface
snap connect wifi-connect:
7- run
sudo wifi-connect.
EXPECTED:
- same denial and result as step 5, as wifi-connect tries to mount content share in rw mode into $SNAP/snap/sockets which is read only
RESULT:
- got this succesful reply
Wifi-ap Configuration:
Unix HTTP client
{"result"
- Anytime from now on you execute the operation, it works.
-------
attached is wifi-connect snap used for this. You can find the source code for it in here [1]
[1] https:/
This is a known issue that is being tracked https:/ /github. com/snapcore/ snapd/projects/ 1