Commit cd2e6154 authored by anonym's avatar anonym
Browse files

Fix test broken by our AppArmor alias for /live/overlay.

Due to the alias, /live/overlay will be treated as
/lib/live/mount/overlay.
parent 653836b1
......@@ -35,10 +35,14 @@ Feature: Using Evince
Then I see "EvinceUnableToOpen.png" after at most 10 seconds
And AppArmor has denied "/usr/bin/evince" from opening "/lib/live/mount/overlay/home/amnesia/.gnupg/default-testpage.pdf"
When I close Evince
Given AppArmor has not denied "/usr/bin/evince" from opening "/live/overlay/home/amnesia/.gnupg/default-testpage.pdf"
# Due to our AppArmor rewriting rules, /live/overlay will be treated
# as /lib/live/mount/overlay. We have to clear syslog we'll look for
# the same entry as above again.
Given I clear syslog
And AppArmor has not denied "/usr/bin/evince" from opening "/lib/live/mount/overlay/home/amnesia/.gnupg/default-testpage.pdf"
When I try to open "/live/overlay/home/amnesia/.gnupg/default-testpage.pdf" with Evince
Then I see "EvinceUnableToOpen.png" after at most 10 seconds
And AppArmor has denied "/usr/bin/evince" from opening "/live/overlay/home/amnesia/.gnupg/default-testpage.pdf"
And AppArmor has denied "/usr/bin/evince" from opening "/lib/live/mount/overlay/home/amnesia/.gnupg/default-testpage.pdf"
@keep_volumes
Scenario: Installing Tails on a USB drive, creating a persistent partition, copying PDF files to it
......
......@@ -1120,6 +1120,11 @@ Given /^I wait (?:between (\d+) and )?(\d+) seconds$/ do |min, max|
sleep(time)
end
Given /^I clear syslog$/ do
next if @skip_steps_while_restoring_background
@vm.execute_successfully('echo > /var/log/syslog')
end
When /^AppArmor has (not )?denied "([^"]+)" from opening "([^"]+)"(?: after at most (\d+) seconds)?$/ do |anti_test, profile, file, time|
next if @skip_steps_while_restoring_background
expected_cmd_status = anti_test ? false : true
......
......@@ -83,10 +83,14 @@ Feature: Browsing the web using the Tor Browser
When I open the address "file:///lib/live/mount/overlay/home/amnesia/.gnupg/synaptic.html" in the Tor Browser
Then I do not see "TorBrowserSynapticManual.png" after at most 5 seconds
And AppArmor has denied "/usr/local/lib/tor-browser/firefox" from opening "/lib/live/mount/overlay/home/amnesia/.gnupg/synaptic.html"
Given AppArmor has not denied "/usr/local/lib/tor-browser/firefox" from opening "/live/overlay/home/amnesia/.gnupg/synaptic.html"
# Due to our AppArmor rewriting rules, /live/overlay will be treated
# as /lib/live/mount/overlay. We have to clear syslog we'll look for
# the same entry as above again.
And I clear syslog
Given AppArmor has not denied "/usr/local/lib/tor-browser/firefox" from opening "/lib/live/mount/overlay/home/amnesia/.gnupg/synaptic.html"
When I open the address "file:///live/overlay/home/amnesia/.gnupg/synaptic.html" in the Tor Browser
Then I do not see "TorBrowserSynapticManual.png" after at most 5 seconds
And AppArmor has denied "/usr/local/lib/tor-browser/firefox" from opening "/live/overlay/home/amnesia/.gnupg/synaptic.html"
And AppArmor has denied "/usr/local/lib/tor-browser/firefox" from opening "/lib/live/mount/overlay/home/amnesia/.gnupg/synaptic.html"
# We do not get any AppArmor log for when access to files in /tmp is denied
# since we explictly override (commit 51c0060) the rules (from the user-tmp
# abstration) that would otherwise allow it, and we do so with "deny", which
......
......@@ -36,10 +36,14 @@ Feature: Using Totem
And AppArmor has denied "/usr/bin/totem" from opening "/lib/live/mount/overlay/home/amnesia/.gnupg/video.mp4"
Given I close Totem
And the file "/live/overlay/home/amnesia/.gnupg/video.mp4" exists
And AppArmor has not denied "/usr/bin/totem" from opening "/live/overlay/home/amnesia/.gnupg/video.mp4"
# Due to our AppArmor rewriting rules, /live/overlay will be treated
# as /lib/live/mount/overlay. We have to clear syslog we'll look for
# the same entry as above again.
And I clear syslog
And AppArmor has not denied "/usr/bin/totem" from opening "/lib/live/mount/overlay/home/amnesia/.gnupg/video.mp4"
When I try to open "/live/overlay/home/amnesia/.gnupg/video.mp4" with Totem
Then I see "TotemUnableToOpen.png" after at most 10 seconds
And AppArmor has denied "/usr/bin/totem" from opening "/live/overlay/home/amnesia/.gnupg/video.mp4"
And AppArmor has denied "/usr/bin/totem" from opening "/lib/live/mount/overlay/home/amnesia/.gnupg/video.mp4"
@check_tor_leaks
Scenario: Watching a WebM video over HTTPS, with and without the command-line
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment