4 I want to view and print PDF files in Evince
5 And AppArmor should prevent Evince from doing dangerous things
7 Scenario: I can view and print a PDF file stored in /usr/share
8 Given I have started Tails from DVD without network and logged in
9 When I open "/usr/share/cups/data/default-testpage.pdf" with Evince
10 Then I see "CupsTestPage.png" after at most 40 seconds
11 And I can print the current document to "/home/amnesia/output.pdf"
13 Scenario: I can view and print a PDF file stored in non-persistent /home/amnesia
14 Given I have started Tails from DVD without network and logged in
15 And I copy "/usr/share/cups/data/default-testpage.pdf" to "/home/amnesia" as user "amnesia"
16 When I open "/home/amnesia/default-testpage.pdf" with Evince
17 Then I see "CupsTestPage.png" after at most 40 seconds
18 And I can print the current document to "/home/amnesia/output.pdf"
21 Scenario: I cannot view a PDF file stored in non-persistent /home/amnesia/.gnupg
22 Given I have started Tails from DVD without network and logged in
23 And I copy "/usr/share/cups/data/default-testpage.pdf" to "/home/amnesia/.gnupg" as user "amnesia"
24 Then the file "/home/amnesia/.gnupg/default-testpage.pdf" exists
25 And the file "/lib/live/mount/overlay/rw/home/amnesia/.gnupg/default-testpage.pdf" exists after at most 10 seconds
26 And the file "/live/overlay/rw/home/amnesia/.gnupg/default-testpage.pdf" exists after at most 10 seconds
27 Given I start monitoring the AppArmor log of "/usr/bin/evince"
28 When I try to open "/home/amnesia/.gnupg/default-testpage.pdf" with Evince
29 Then Evince tells me it cannot open "/home/amnesia/.gnupg/default-testpage.pdf"
30 And AppArmor has denied "/usr/bin/evince" from opening "/home/amnesia/.gnupg/default-testpage.pdf"
32 Given I restart monitoring the AppArmor log of "/usr/bin/evince"
33 When I try to open "/lib/live/mount/overlay/rw/home/amnesia/.gnupg/default-testpage.pdf" with Evince
34 Then Evince tells me it cannot open "/lib/live/mount/overlay/rw/home/amnesia/.gnupg/default-testpage.pdf"
35 And AppArmor has denied "/usr/bin/evince" from opening "/usr/lib/live/mount/overlay/rw/home/amnesia/.gnupg/default-testpage.pdf"
37 Given I restart monitoring the AppArmor log of "/usr/bin/evince"
38 When I try to open "/live/overlay/rw/home/amnesia/.gnupg/default-testpage.pdf" with Evince
39 Then Evince tells me it cannot open "/live/overlay/rw/home/amnesia/.gnupg/default-testpage.pdf"
40 # Due to our AppArmor aliases, /live/overlay will be treated
41 # as /usr/lib/live/mount/overlay.
42 And AppArmor has denied "/usr/bin/evince" from opening "/usr/lib/live/mount/overlay/rw/home/amnesia/.gnupg/default-testpage.pdf"
44 Scenario: I can view and print a PDF file stored in persistent /home/amnesia/Persistent
45 Given I have started Tails without network from a USB drive with a persistent partition enabled and logged in
46 And I copy "/usr/share/cups/data/default-testpage.pdf" to "/home/amnesia/Persistent" as user "amnesia"
47 Then the file "/home/amnesia/Persistent/default-testpage.pdf" exists
48 When I open "/home/amnesia/Persistent/default-testpage.pdf" with Evince
49 Then I see "CupsTestPage.png" after at most 40 seconds
50 And I can print the current document to "/home/amnesia/Persistent/output.pdf"
53 Scenario: I cannot view a PDF file stored in persistent /home/amnesia/.gnupg
54 Given I have started Tails without network from a USB drive with a persistent partition enabled and logged in
55 And I copy "/usr/share/cups/data/default-testpage.pdf" to "/home/amnesia/.gnupg" as user "amnesia"
56 Then the file "/home/amnesia/.gnupg/default-testpage.pdf" exists
57 Given I start monitoring the AppArmor log of "/usr/bin/evince"
58 And I try to open "/home/amnesia/.gnupg/default-testpage.pdf" with Evince
59 Then Evince tells me it cannot open "/home/amnesia/.gnupg/default-testpage.pdf"
60 And AppArmor has denied "/usr/bin/evince" from opening "/home/amnesia/.gnupg/default-testpage.pdf"