hello-world.evil does not work as an example of the app confinement

Bug #1466779 reported by Nobuto Murata
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Snappy
Fix Released
Undecided
Jamie Strandboge

Bug Description

hello-world.evil succeeds, it should work as an example of blocked by the confinement.

(RaspberryPi2)ubuntu@snappy:~$ hello-world.evil
Hello Evil World!
This example demonstrates the app confinement
You should see a permission denied error next
If you see this line the confinement is not working correctly, please file a bug

(RaspberryPi2)ubuntu@snappy:~$ cat /tmp/myevil.txt
Haha

(RaspberryPi2)ubuntu@snappy:~$ snappy list -v
Name Date Version Developer
ubuntu-core 2015-06-11 3 ubuntu*
ubuntu-core 2015-06-11 3 ubuntu
hello-world 2015-06-19 1.0.17 canonical*
webdm 2015-06-11 0.9 *
pi2 2015-06-11 0.13 *

Related branches

Nobuto Murata (nobuto)
summary: - hello-world.evil does not work as a example of the app confinement
+ hello-world.evil does not work as an example of the app confinement
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

This was introduced with the new /tmp handling. See:
echo "Haha" > /tmp/myevil.txt

A simple fix is to use /var/tmp/myevil.txt instead.

Revision history for this message
Leo Arias (elopio) wrote :

Reproduced on beagle bone black rev C 15.04 edge #94.
We need a test for this, should be easy to write as part of the selftests.

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Fixed in 1.0.18

$ sudo snappy update hello-world.canonical
Installing hello-world (1.0.18)
Starting download of hello-world
21.60 KB / 21.60 KB [==========================================] 100.00 % 82.91 KB/s
Done
Name Date Version Developer
hello-world 1-01-01 1.0.18 canonical
$ hello-world.evil
Hello Evil World!
This example demonstrates the app confinement
You should see a permission denied error next
/apps/hello-world.canonical/1.0.18/bin/evil: 9: /apps/hello-world.canonical/1.0.18/bin/evil: cannot create /var/tmp/myevil.txt: Permission denied

Changed in snappy:
assignee: nobody → Jamie Strandboge (jdstrand)
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.