$SNAP_USER_DATA is no longer created by snap-confine but is not yet created by snapd
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snap-confine |
Fix Released
|
High
|
Zygmunt Krynicki | ||
snap-confine (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
Snaps cannot access $SNAP_USER_DATA directory because snap-confine does not create it.
This bug is fixed by reverting code that was removed from snap-confine that used to create this directory. This was done because at the time snapd developers introduced a feature where snapd itself would create the appropriate directory but this change took longer to enable than anticipated and in result, for a while, neither program did this.
Now snap-confine tries to create the directory even if snapd also does it earlier. This ensures that in the execution environment the snap application can rely on this directory to be in place.
For more information about the execution environment, please see this article http://
[Test Case]
The test case can be found here:
https:/
The test case is ran automatically for each pull request and for each final release. It can be reproduced manually by executing the shell commands listed in the prepare/
The commands there assume that snapd and snap-confine are installed.
No other additional setup is necessary.
[Regression Potential]
* Regression potential is minimal as this code used to exist in snap-confine before.
* The fix was tested on Ubuntu via spread and on several other distributions successfully.
[Other Info]
* This bug is a part of a major SRU that brings snap-confine in Ubuntu 16.04 in line with the current upstream release 1.0.41.
* This bug was included in an earlier SRU and is now fixed in Ubuntu. I am updating the template here to ensure that the process is fully documented from 1.0.38 all the way up to the current upstream release 1.0.41.
* snap-confine is technically an integral part of snapd which has an SRU exception and is allowed to introduce new features and take advantage of accelerated procedure. For more information see https:/
== # Pre-SRU bug description follows # ==
We've noticed that the code that creates the $SNAP_USER_DATA directory has now been removed from snap-confine for the past few releases but the corresponding code in snapd, that depends on snap-exec, is not yet active. This has lead to some snaps that rely on it to have no way to create per-user data directories.
TEST CASE:
1. sudo snap install bluez
2. sudo systemctl status snap.bluez.obex
3. verify that it fails to start the service
4. install snapd from xenial-proposed
5. snap remove bluez
6. snap install bluez
7. repeat (2)
8. verify that it works this time
Changed in snap-confine: | |
milestone: | none → 1.0.40 |
assignee: | nobody → Zygmunt Krynicki (zyga) |
importance: | Undecided → High |
status: | New → In Progress |
Changed in snap-confine (Ubuntu Xenial): | |
status: | New → Fix Committed |
description: | updated |
Changed in snap-confine: | |
status: | Fix Committed → Fix Released |
description: | updated |
description: | updated |
This is fixed by https:/ /github. com/snapcore/ snap-confine/ pull/97