Commit 088db02f authored by Cyril Brulebois's avatar Cyril Brulebois
Browse files

Merge branch 'origin/web/release-3.10.1'

parents a87c294c e8c34d21
......@@ -26,7 +26,7 @@ AMNESIA_ISOHYBRID_OPTS="-h 255 -s 63 --id 42 --verbose"
REQUIRED_SYSLINUX_UTILS_UPSTREAM_VERSION="6.03~pre20"
# Kernel version
KERNEL_VERSION='4.17.0-3'
KERNEL_VERSION='4.18.0-2'
KERNEL_SOURCE_VERSION=$(
echo "$KERNEL_VERSION" \
| perl -p -E 's{\A (\d+ [.] \d+) [.] .*}{$1}xms'
......
......@@ -499,7 +499,7 @@ etc/modprobe.d/amd64-microcode-blacklist.conf 32065
lib/modprobe.d/fbdev-blacklist.conf 32064
etc/modprobe.d/intel-microcode-blacklist.conf 32063
etc/modprobe.d/loop.conf 32062
lib/modules/4.17.0-3-amd64/modules.softdep 32061
lib/modules/4.18.0-2-amd64/modules.softdep 32061
etc/modprobe.d/no-bluetooth.conf 32060
etc/modprobe.d/no-conntrack-helper.conf 32059
etc/modprobe.d/no-mei.conf 32058
......@@ -507,10 +507,10 @@ etc/modprobe.d/no-n-hdlc.conf 32057
etc/modprobe.d/no-pc-speaker.conf 32056
lib/modprobe.d/systemd.conf 32055
etc/modprobe.d/uncommon-network-protocols.conf 32054
lib/modules/4.17.0-3-amd64/modules.dep.bin 32053
lib/modules/4.17.0-3-amd64/modules.alias.bin 32052
lib/modules/4.17.0-3-amd64/modules.symbols.bin 32051
lib/modules/4.17.0-3-amd64/modules.builtin.bin 32050
lib/modules/4.18.0-2-amd64/modules.dep.bin 32053
lib/modules/4.18.0-2-amd64/modules.alias.bin 32052
lib/modules/4.18.0-2-amd64/modules.symbols.bin 32051
lib/modules/4.18.0-2-amd64/modules.builtin.bin 32050
lib/systemd/network/99-default.link 32049
etc/udev/rules.d/00-mac-spoof.rules 32048
lib/udev/rules.d/40-usb_modeswitch.rules 32047
......@@ -609,18 +609,18 @@ sbin/plymouthd 31953
lib/x86_64-linux-gnu/libply-splash-core.so.4.0.0 31952
etc/adjtime 31950
usr/bin/dbus-daemon 31948
lib/modules/4.17.0-3-amd64/kernel/drivers/cpufreq/acpi-cpufreq.ko 31943
lib/modules/4.18.0-2-amd64/kernel/drivers/cpufreq/acpi-cpufreq.ko 31943
run/udev/tags/seat/+input:input4 31934
run/udev/tags/seat/+input:input6 31927
lib/modules/4.17.0-3-amd64/kernel/drivers/char/hw_random/rng-core.ko 31923
lib/modules/4.17.0-3-amd64/kernel/drivers/acpi/battery.ko 31910
lib/modules/4.17.0-3-amd64/kernel/net/rfkill/rfkill.ko 31908
lib/modules/4.17.0-3-amd64/kernel/drivers/acpi/ac.ko 31906
lib/modules/4.18.0-2-amd64/kernel/drivers/char/hw_random/rng-core.ko 31923
lib/modules/4.18.0-2-amd64/kernel/drivers/acpi/battery.ko 31910
lib/modules/4.18.0-2-amd64/kernel/net/rfkill/rfkill.ko 31908
lib/modules/4.18.0-2-amd64/kernel/drivers/acpi/ac.ko 31906
run/udev/tags/seat/+input:input3 31899
run/udev/tags/seat/+input:input2 31894
lib/modules/4.17.0-3-amd64/kernel/drivers/cpufreq/pcc-cpufreq.ko 31892
lib/modules/4.17.0-3-amd64/kernel/drivers/input/evdev.ko 31888
lib/modules/4.17.0-3-amd64/kernel/drivers/char/tpm/tpm.ko 31880
lib/modules/4.18.0-2-amd64/kernel/drivers/cpufreq/pcc-cpufreq.ko 31892
lib/modules/4.18.0-2-amd64/kernel/drivers/input/evdev.ko 31888
lib/modules/4.18.0-2-amd64/kernel/drivers/char/tpm/tpm.ko 31880
run/udev/tags/seat/c226:0 31872
run/udev/tags/master-of-seat/c226:0 31871
run/udev/tags/seat/+drm:card0-DP-1 31867
......@@ -631,7 +631,7 @@ run/udev/tags/seat/+drm:card0-DP-2 31859
run/udev/tags/master-of-seat/+drm:card0-DP-2 31858
run/udev/tags/seat/+drm:card0-HDMI-A-1 31855
run/udev/tags/master-of-seat/+drm:card0-HDMI-A-1 31854
lib/modules/4.17.0-3-amd64/kernel/drivers/char/tpm/tpm_tis_core.ko 31848
lib/modules/4.18.0-2-amd64/kernel/drivers/char/tpm/tpm_tis_core.ko 31848
run/udev/tags/seat/+drm:card0-LVDS-1 31844
run/udev/tags/master-of-seat/+drm:card0-LVDS-1 31843
run/udev/tags/seat/+drm:card0-HDMI-A-2 31840
......@@ -646,15 +646,15 @@ bin/true 31812
lib/udev/lmt-udev 31811
lib/x86_64-linux-gnu/libdbus-1.so.3.14.15 31810
run/udev/tags/seat/c189:512 31806
lib/modules/4.17.0-3-amd64/kernel/drivers/char/tpm/tpm_tis.ko 31804
lib/modules/4.18.0-2-amd64/kernel/drivers/char/tpm/tpm_tis.ko 31804
run/udev/tags/seat/c189:256 31800
usr/sbin/laptop_mode 31798
lib/x86_64-linux-gnu/libsystemd.so.0.21.0 31796
lib/modules/4.17.0-3-amd64/kernel/sound/soundcore.ko 31795
lib/modules/4.18.0-2-amd64/kernel/sound/soundcore.ko 31795
lib/x86_64-linux-gnu/libapparmor.so.1.4.0 31794
usr/share/dbus-1/system.conf 31792
lib/modules/4.17.0-3-amd64/kernel/drivers/pci/hotplug/shpchp.ko 31791
lib/modules/4.17.0-3-amd64/kernel/net/wireless/cfg80211.ko 31783
lib/modules/4.18.0-2-amd64/kernel/drivers/pci/hotplug/shpchp.ko 31791
lib/modules/4.18.0-2-amd64/kernel/net/wireless/cfg80211.ko 31783
usr/share/dbus-1/system.d/org.freedesktop.hostname1.conf 31782
usr/share/dbus-1/system.d/org.freedesktop.locale1.conf 31781
usr/share/dbus-1/system.d/org.freedesktop.login1.conf 31780
......@@ -730,8 +730,8 @@ usr/share/dbus-1/system-services/org.freedesktop.resolve1.service 31693
usr/share/dbus-1/system-services/org.freedesktop.systemd1.service 31692
usr/share/dbus-1/system-services/org.freedesktop.timedate1.service 31691
usr/share/dbus-1/system-services/org.opensuse.CupsPkHelper.Mechanism.service 31690
lib/modules/4.17.0-3-amd64/kernel/drivers/mfd/lpc_ich.ko 31689
lib/modules/4.17.0-3-amd64/kernel/sound/core/snd.ko 31688
lib/modules/4.18.0-2-amd64/kernel/drivers/mfd/lpc_ich.ko 31689
lib/modules/4.18.0-2-amd64/kernel/sound/core/snd.ko 31688
bin/uname 31686
usr/lib/accountsservice/accounts-daemon 31685
lib/systemd/systemd-logind 31684
......@@ -756,15 +756,15 @@ sbin/start-stop-daemon 31647
usr/sbin/rngd 31646
usr/bin/tail 31645
usr/local/lib/onion-grater 31643
lib/modules/4.17.0-3-amd64/kernel/sound/core/snd-timer.ko 31642
lib/modules/4.18.0-2-amd64/kernel/sound/core/snd-timer.ko 31642
bin/udevadm 31641
usr/share/tor/tor-service-defaults-torrc 31640
lib/modules/4.17.0-3-amd64/kernel/drivers/char/nvram.ko 31639
lib/modules/4.18.0-2-amd64/kernel/drivers/char/nvram.ko 31639
usr/local/bin/tails-get-bootinfo 31638
usr/local/lib/tails-set-wireless-devices-state 31635
lib/modules/4.17.0-3-amd64/kernel/sound/core/snd-pcm.ko 31632
lib/modules/4.18.0-2-amd64/kernel/sound/core/snd-pcm.ko 31632
etc/crontab 31630
lib/modules/4.17.0-3-amd64/kernel/drivers/platform/x86/thinkpad_acpi.ko 31628
lib/modules/4.18.0-2-amd64/kernel/drivers/platform/x86/thinkpad_acpi.ko 31628
run/systemd/generator.late/speech-dispatcher.service 31622
lib/systemd/systemd-backlight 31620
lib/systemd/system-preset/90-systemd.preset 31617
......@@ -775,7 +775,7 @@ usr/bin/env 31610
usr/share/gdm/generate-config 31608
usr/bin/eject 31605
usr/bin/logger 31604
lib/modules/4.17.0-3-amd64/kernel/sound/core/snd-hwdep.ko 31603
lib/modules/4.18.0-2-amd64/kernel/sound/core/snd-hwdep.ko 31603
bin/sleep 31602
usr/lib/python3.5/argparse.py 31601
usr/bin/basename 31597
......@@ -784,11 +784,11 @@ usr/share/laptop-mode-tools/modules/ac97-powersave 31595
usr/share/laptop-mode-tools/modules/battery-level-polling 31592
usr/local/sbin/udev-watchdog 31591
usr/bin/unmkinitramfs 31590
lib/modules/4.17.0-3-amd64/kernel/drivers/scsi/sg.ko 31589
lib/modules/4.17.0-3-amd64/kernel/drivers/platform/x86/wmi-bmof.ko 31588
lib/modules/4.17.0-3-amd64/kernel/sound/hda/snd-hda-core.ko 31587
lib/modules/4.18.0-2-amd64/kernel/drivers/scsi/sg.ko 31589
lib/modules/4.18.0-2-amd64/kernel/drivers/platform/x86/wmi-bmof.ko 31588
lib/modules/4.18.0-2-amd64/kernel/sound/hda/snd-hda-core.ko 31587
usr/lib/x86_64-linux-gnu/libdconf.so.1.0.0 31586
lib/modules/4.17.0-3-amd64/kernel/drivers/input/serio/serio_raw.ko 31585
lib/modules/4.18.0-2-amd64/kernel/drivers/input/serio/serio_raw.ko 31585
usr/share/laptop-mode-tools/modules/bluetooth 31574
run/udev/links/\x2frtc/c252:0 31570
usr/bin/getopt 31568
......@@ -801,7 +801,7 @@ usr/lib/python3.5/__pycache__/glob.cpython-35.pyc 31560
lib/live/mount/overlay/usr/lib/python3.5/__pycache__/fnmatch.cpython-35.pyc 31559
usr/lib/python3.5/__pycache__/fnmatch.cpython-35.pyc 31558
usr/lib/python3.5/ipaddress.py 31556
lib/modules/4.17.0-3-amd64/kernel/virt/lib/irqbypass.ko 31555
lib/modules/4.18.0-2-amd64/kernel/virt/lib/irqbypass.ko 31555
usr/share/laptop-mode-tools/modules/configuration-file-control 31554
usr/share/laptop-mode-tools/modules/cpufreq 31552
usr/share/laptop-mode-tools/modules/cpuhotplug 31551
......@@ -818,7 +818,7 @@ usr/share/laptop-mode-tools/modules/hdparm 31457
usr/share/laptop-mode-tools/modules/intel-hda-powersave 31425
run/udev/tags/seat/+input:input5 31418
run/udev/tags/seat/+input:input0 31399
lib/modules/4.17.0-3-amd64/kernel/arch/x86/kvm/kvm.ko 31391
lib/modules/4.18.0-2-amd64/kernel/arch/x86/kvm/kvm.ko 31391
usr/share/laptop-mode-tools/modules/intel-sata-powermgmt 31353
sbin/ethtool 31352
usr/share/laptop-mode-tools/modules/intel_pstate 31265
......@@ -897,14 +897,14 @@ usr/share/laptop-mode-tools/modules/sched-mc-power-savings 31148
usr/share/laptop-mode-tools/modules/sched-smt-power-savings 31147
sbin/on_ac_power 31146
bin/loginctl 31145
lib/modules/4.17.0-3-amd64/kernel/sound/pci/hda/snd-hda-codec.ko 31144
lib/modules/4.18.0-2-amd64/kernel/sound/pci/hda/snd-hda-codec.ko 31144
etc/hdparm.conf 31143
lib/modules/4.17.0-3-amd64/kernel/sound/pci/hda/snd-hda-intel.ko 31142
lib/modules/4.18.0-2-amd64/kernel/sound/pci/hda/snd-hda-intel.ko 31142
bin/kmod 31141
lib/modules/4.17.0-3-amd64/kernel/sound/pci/hda/snd-hda-codec-generic.ko 31140
lib/modules/4.18.0-2-amd64/kernel/sound/pci/hda/snd-hda-codec-generic.ko 31140
usr/lib/x86_64-linux-gnu/libgudev-1.0.so.0.2.0 31137
usr/share/laptop-mode-tools/modules/start-stop-programs 31136
lib/modules/4.17.0-3-amd64/kernel/sound/pci/hda/snd-hda-codec-conexant.ko 31135
lib/modules/4.18.0-2-amd64/kernel/sound/pci/hda/snd-hda-codec-conexant.ko 31135
run/udev/links/\x2fdisk\x2fby-id\x2fata-HITACHI_HTS723216L9SA60_100120FC1220NCJHDEVG-part1/b8:1 31134
run/udev/links/\x2fdisk\x2fby-id\x2fwwn-0x5000cca586e32f4c-part1/b8:1 31133
run/udev/links/\x2fdisk\x2fby-partuuid\x2f95fbd1e1-01/b8:1 31132
......@@ -947,8 +947,8 @@ usr/share/laptop-mode-tools/modules/wireless-power 31088
usr/lib/python3.5/calendar.py 31087
lib/systemd/system-shutdown/tails 31086
bin/cpio 31085
lib/modules/4.17.0-3-amd64/kernel/drivers/watchdog/iTCO_vendor_support.ko 31084
lib/modules/4.17.0-3-amd64/kernel/arch/x86/kvm/kvm-intel.ko 31082
lib/modules/4.18.0-2-amd64/kernel/drivers/watchdog/iTCO_vendor_support.ko 31084
lib/modules/4.18.0-2-amd64/kernel/arch/x86/kvm/kvm-intel.ko 31082
lib/systemd/systemd-shutdown 31081
sbin/iw 31080
usr/lib/python3.5/queue.py 31079
......@@ -990,7 +990,7 @@ usr/lib/python3/dist-packages/stem/descriptor/extrainfo_descriptor.py 31043
usr/lib/python3/dist-packages/stem/exit_policy.py 31042
usr/lib/x86_64-linux-gnu/libffi.so.6.0.4 31041
usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0.5000.3 31040
lib/modules/4.17.0-3-amd64/kernel/drivers/watchdog/iTCO_wdt.ko 31025
lib/modules/4.18.0-2-amd64/kernel/drivers/watchdog/iTCO_wdt.ko 31025
lib/systemd/system/sound.target 31011
usr/lib/x86_64-linux-gnu/gio/modules/giomodule.cache 30999
usr/sbin/alsactl 30998
......@@ -1006,7 +1006,7 @@ usr/lib/x86_64-linux-gnu/libpolkit-backend-1.so.0.0.0 30975
usr/lib/x86_64-linux-gnu/polkit-1/extensions/libnullbackend.so 30974
etc/polkit-1/nullbackend.conf.d/50-nullbackend.conf 30973
etc/gdm3/daemon.conf 30972
lib/modules/4.17.0-3-amd64/kernel/drivers/hwmon/coretemp.ko 30971
lib/modules/4.18.0-2-amd64/kernel/drivers/hwmon/coretemp.ko 30971
usr/lib/python3/dist-packages/stem/util/tor_tools.py 30970
usr/lib/python3/dist-packages/stem/version.py 30969
usr/lib/python3/dist-packages/stem/descriptor/networkstatus.py 30968
......@@ -1032,7 +1032,7 @@ usr/lib/x86_64-linux-gnu/libX11.so.6.3.0 30944
usr/lib/python3/dist-packages/stem/response/events.py 30943
usr/lib/python3/dist-packages/yaml/__init__.py 30942
sbin/blockdev 30941
lib/modules/4.17.0-3-amd64/kernel/drivers/thermal/intel_powerclamp.ko 30939
lib/modules/4.18.0-2-amd64/kernel/drivers/thermal/intel_powerclamp.ko 30939
usr/lib/python3/dist-packages/yaml/error.py 30938
usr/lib/python3/dist-packages/yaml/tokens.py 30937
usr/lib/python3/dist-packages/yaml/events.py 30936
......@@ -3327,10 +3327,10 @@ usr/lib/x86_64-linux-gnu/perl5/5.24/Class/XSAccessor.pm 28381
usr/lib/x86_64-linux-gnu/perl5/5.24/Class/XSAccessor/Heavy.pm 28380
usr/lib/x86_64-linux-gnu/perl5/5.24/auto/Class/XSAccessor/XSAccessor.so 28355
lib/systemd/system/systemd-udev-settle.service 28346
lib/modules/4.17.0-3-amd64/kernel/drivers/net/ethernet/intel/e1000e/e1000e.ko 28330
lib/modules/4.18.0-2-amd64/kernel/drivers/net/ethernet/intel/e1000e/e1000e.ko 28330
usr/share/perl5/Moo/Role.pm 28323
usr/share/perl5/Role/Tiny.pm 28322
lib/modules/4.17.0-3-amd64/kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko 28318
lib/modules/4.18.0-2-amd64/kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko 28318
usr/share/perl5/GnuPG/HashInit.pm 28307
usr/share/perl5/Type/Utils.pm 28300
usr/share/perl5/Type/Library.pm 28299
......@@ -3348,7 +3348,7 @@ usr/share/perl/5.24.1/SelfLoader.pm 28275
usr/share/perl5/Types/Standard.pm 28271
usr/lib/x86_64-linux-gnu/perl5/5.24/Sub/Name.pm 28269
usr/lib/x86_64-linux-gnu/perl5/5.24/auto/Sub/Name/Name.so 28268
lib/modules/4.17.0-3-amd64/kernel/net/mac80211/mac80211.ko 28265
lib/modules/4.18.0-2-amd64/kernel/net/mac80211/mac80211.ko 28265
usr/share/perl5/Type/Coercion.pm 28263
usr/share/perl5/GnuPG/Interface.pm 28246
usr/share/perl/5.24.1/English.pm 28240
......@@ -3363,7 +3363,7 @@ usr/share/perl/5.24.1/autodie/Scope/GuardStack.pm 28221
usr/share/perl/5.24.1/autodie/Scope/Guard.pm 28220
usr/share/perl/5.24.1/Class/Struct.pm 28122
usr/share/perl/5.24.1/Math/BigInt.pm 28077
lib/modules/4.17.0-3-amd64/kernel/drivers/net/wireless/intel/iwlwifi/dvm/iwldvm.ko 28050
lib/modules/4.18.0-2-amd64/kernel/drivers/net/wireless/intel/iwlwifi/dvm/iwldvm.ko 28050
usr/local/lib/tails-spoof-mac 28039
usr/local/lib/tails-shell-library/hardware.sh 28038
usr/local/lib/tails-shell-library/log.sh 28037
......@@ -3372,7 +3372,7 @@ usr/share/perl/5.24.1/Math/BigInt/Calc.pm 28035
lib/crda/setregdomain 28033
lib/systemd/systemd-rfkill 28032
etc/default/crda 28031
lib/modules/4.17.0-3-amd64/kernel/crypto/arc4.ko 28029
lib/modules/4.18.0-2-amd64/kernel/crypto/arc4.ko 28029
usr/bin/macchanger 28027
usr/share/perl/5.24.1/integer.pm 28026
usr/share/macchanger/OUI.list 28025
......
......@@ -105,7 +105,8 @@ Package: vulcan* libvulkan*
Pin: release o=Debian,n=stretch-backports
Pin-Priority: 999
Package: wayland-protocols
Explanation: src:wayland and src:wayland-protocols
Package: libwayland* wayland-protocols
Pin: release o=Debian,n=stretch-backports
Pin-Priority: 999
......
#!/bin/sh
set -e
echo "Configuring htpdate HTTP User-Agent"
CONFFILE='/etc/default/htpdate.user-agent'
install -o root -g root -m 0644 /dev/null "$CONFFILE"
echo "HTTP_USER_AGENT=\"$(/usr/local/lib/getTorBrowserUserAgent)\"" \
> "$CONFFILE"
HTTP_USER_AGENT="Mozilla/5.0 (Windows NT 6.1; rv:60.0) Gecko/20100101 Firefox/60.0"
amnesia ALL = NOPASSWD: /usr/local/lib/kill-boot-profile
amnesia ALL = NOPASSWD: /usr/local/lib/kill-boot-profile ""
amnesia ALL = NOPASSWD: /sbin/poweroff
amnesia ALL = NOPASSWD: /sbin/reboot
amnesia ALL = NOPASSWD: /sbin/poweroff ""
amnesia ALL = NOPASSWD: /sbin/reboot ""
Cmnd_Alias PERSISTENCE_SETUP = /usr/bin/tails-persistence-setup "", /usr/bin/tails-persistence-setup --verbose, /usr/bin/tails-persistence-setup --step delete, /usr/bin/tails-persistence-setup --step delete --verbose, /usr/bin/tails-persistence-setup --force-enable-preset AdditionalSoftware
amnesia ALL = (tails-persistence-setup) NOPASSWD: PERSISTENCE_SETUP
tails-persistence-setup ALL = (root) NOPASSWD: /usr/bin/tails-fix-persistent-volume-permissions
tails-persistence-setup ALL = (root) NOPASSWD: /usr/bin/tails-fix-persistent-volume-permissions ""
amnesia ALL = NOPASSWD: /usr/local/sbin/unsafe-browser
amnesia ALL = NOPASSWD: /usr/local/sbin/unsafe-browser ""
// Prefs that *need* to be here because they are not honored
// if we set them via /usr/share/tails/tor-browser-prefs.js
user_pref("extensions.torbutton.launch_warning", false);
user_pref("intl.accept_languages", "en-US, en");
user_pref("javascript.use_us_english_locale", true);
......@@ -6,6 +6,8 @@
["command", {"args": ["/usr/bin/lspci", "-nn"]}],
["command", {"args": ["/bin/df", "--human-readable", "--print-type"]}],
["command", {"args": ["/bin/mount", "--show-labels"]}],
["command", {"args": ["/sbin/dmsetup", "ls", "--tree", "--options=blkdevname,uuid,active,open,rw,notrunc"]}],
["command", {"args": ["/sbin/losetup", "--list", "--output=NAME,BACK-FILE,AUTOCLEAR,RO,PARTSCAN,SIZELIMIT,OFFSET"]}],
["command", {"args": ["/bin/lsmod"]}],
["file", {"user": "root", "path": "/proc/asound/cards"}],
["file", {"user": "root", "path": "/proc/asound/devices"}],
......
......@@ -20,7 +20,7 @@ from tailslib.persistence import ( # NOQA: E402
is_tails_media_writable,
launch_persistence_setup)
from tailslib.additionalsoftware.config import ( # NOQA: E402
from tailslib.additionalsoftware import ( # NOQA: E402
get_additional_packages,
get_packages_list_path,
filter_package_details)
......
#!/bin/sh
set -e
set -u
echo 'Mozilla/5.0 (Windows NT 6.1; rv:60.0) Gecko/20100101 Firefox/60.0'
......@@ -134,6 +134,7 @@ import socket
import socketserver
import stem
import stem.control
import stem.connection
import struct
import sys
import textwrap
......@@ -565,12 +566,8 @@ class FilteredControlPortProxyHandler(socketserver.StreamRequestHandler):
))
def connect_to_real_control_port(self):
with open(global_args.control_cookie_path, "rb") as f:
cookie = f.read()
controller = stem.control.Controller.from_socket_file(
global_args.control_socket_path
)
controller.authenticate(cookie)
controller = stem.connection.connect(control_socket=global_args.control_socket_path)
stem.connection.authenticate_cookie(controller, cookie_path=global_args.control_cookie_path)
return controller
def handle(self):
......
#!/usr/bin/python3
#!/usr/bin/env python3
import gettext
import json
......@@ -15,7 +15,8 @@ import apt.cache
from tailslib import LIVE_USERNAME
from tailslib.additionalsoftware.config import (
from tailslib.additionalsoftware import (
ASPDataError,
add_additional_packages,
filter_package_details,
get_additional_packages,
......@@ -74,7 +75,8 @@ def _launch_apt_get(specific_args):
logging.info(line.rstrip())
apt_get.wait()
if apt_get.returncode:
logging.warn("apt-get exited with returncode %i" % apt_get.returncode)
logging.warning("apt-get exited with returncode %i"
% apt_get.returncode)
return apt_get.returncode
......@@ -116,8 +118,8 @@ def _notify(title, body="", accept_label="", deny_label="",
# sudo failed to execute the command
raise OSError(completed_process.stderr)
except OSError as e:
logging.warn("Warning: unable to notify the user. %s" % e)
logging.warn("The notification was: %s %s" % (title, body))
logging.warning("Warning: unable to notify the user. %s" % e)
logging.warning("The notification was: %s %s" % (title, body))
return None
if return_id:
......@@ -136,7 +138,7 @@ def _notify(title, body="", accept_label="", deny_label="",
def _notify_failure(summary, details=None):
"""Display a failure notification to the user of the live system.
The user has the option to edit the configuration of to view the system
The user has the option to edit the configuration or to view the system
log.
"""
if details:
......@@ -148,7 +150,7 @@ def _notify_failure(summary, details=None):
else:
details = _("Please check your list of additional "
"software or read the system log to "
"understand the problem.").format(details=details)
"understand the problem.")
action_clicked = _notify(summary, details, _("Show Log"), _("Configure"),
urgent=True)
......@@ -230,13 +232,13 @@ def has_additional_packages_list(search_new_persistence=False):
try:
packages_list_path = get_packages_list_path(search_new_persistence)
except FileNotFoundError as e:
logging.warn("Warning: {}".format(e))
logging.warning("Warning: {}".format(e))
return False
if os.path.isfile(packages_list_path):
logging.info("Found additional packages list.")
return True
else:
logging.warn("Warning: no configuration file found.")
logging.warning("Warning: no configuration file found.")
return False
......@@ -248,8 +250,8 @@ def delete_old_apt_lists(old_apt_lists_dir=OLD_APT_LISTS_DIR):
def save_old_apt_lists(srcdir=APT_LISTS_DIR, destdir=OLD_APT_LISTS_DIR):
"""Save a copy of the APT lists"""
if os.path.exists(destdir):
logging.warn("Warning: a copy of the APT lists already exists, "
"which should never happen. Removing it.")
logging.warning("Warning: a copy of the APT lists already exists, "
"which should never happen. Removing it.")
delete_old_apt_lists(destdir)
shutil.copytree(srcdir, destdir, symlinks=True)
......@@ -306,8 +308,8 @@ def handle_installed_packages(packages):
# If they install packages with their persistent storage locked, they
# probably do it with their persistent storage unlock as well and would
# learn about this feature when it's most relevant for them.
logging.warn("Warning: persistence storage is locked, can't add "
"additional software.")
logging.warning("Warning: persistence storage is locked, can't add "
"additional software.")
elif is_tails_media_writable():
# Translators: Don't translate {packages}, it's a placeholder and will be replaced.
if _notify(_("Add {packages} to your additional software?").format(
......@@ -327,7 +329,7 @@ def handle_installed_packages(packages):
"failed."))
raise e
else: # It's impossible to have a persistent storage
logging.warn("Cannot create persistent storage on this media.")
logging.warning("Cannot create persistent storage on this media.")
if not os.path.isfile(ASP_STATE_INSTALLER_ASKED):
open(ASP_STATE_INSTALLER_ASKED, 'a').close()
# Translators: Don't translate {packages}, it's a placeholder and will be replaced.
......@@ -414,7 +416,8 @@ def apt_hook_pre():
removed_packages = []
line = sys.stdin.readline()
assert line.startswith("VERSION 3")
if not line.startswith("VERSION 3"):
raise ASPDataError("APT data is not version 3")
line = sys.stdin.readline()
# Ignore configuration space, which ends with an empty line
while line != "\n":
......@@ -469,17 +472,18 @@ def apt_hook_post():
packages = json.load(f)
os.remove(ASP_STATE_PACKAGES)
additional_packages_names = map(
filter_package_details,
get_additional_packages(search_new_persistence=True))
additional_packages_names = {
filter_package_details(pkg) for pkg in get_additional_packages(search_new_persistence=True)
}
apt_cache = apt.cache.Cache()
# Filter automatically installed packages and packages already configured
# as additional software
new_manually_installed_packages = set(filter(
lambda pkg: not apt_cache[pkg].is_auto_installed
and pkg not in additional_packages_names, # NOQA: E131
set(packages["installed"])))
new_manually_installed_packages = {
pkg for pkg in packages["installed"] if not apt_cache[pkg].is_auto_installed and
pkg not in additional_packages_names
}
if new_manually_installed_packages:
handle_installed_packages(new_manually_installed_packages)
......@@ -489,7 +493,6 @@ def apt_hook_post():
if additional_packages_removed:
handle_removed_packages(additional_packages_removed)
def install_additional_packages(upgrade_mode=False):
"""Subcommand which activates and installs all additional packages.
......@@ -509,12 +512,12 @@ def install_additional_packages(upgrade_mode=False):
# that, we restore the old APT lists: there are greater chances
# that the APT packages cache still has the corresponding packages.
if os.path.isdir(OLD_APT_LISTS_DIR) and not upgrade_mode:
logging.warn("Found a copy of old APT lists, restoring it.")
logging.warning("Found a copy of old APT lists, restoring it.")
try:
restore_old_apt_lists()
except Exception as e:
logging.warn("Restoring old APT lists failed with %r, "
"deleting them and proceeding anyway." % e)
logging.warning("Restoring old APT lists failed with %r, "
"deleting them and proceeding anyway." % e)
# In all cases, delete the old APT lists: if they could be
# restored we don't need them anymore (and we don't want to
# restore them again next time); if they could not be
......@@ -524,7 +527,7 @@ def install_additional_packages(upgrade_mode=False):
packages = get_additional_packages()
if not packages:
logging.warn("Warning: no packages to install, exiting")
logging.warning("Warning: no packages to install, exiting")
return True
if not upgrade_mode:
installing_notification_id = _notify(
......@@ -539,7 +542,8 @@ def install_additional_packages(upgrade_mode=False):
"--option", "DPkg::Options::=--force-confold",
"install"] + list(packages))
if apt_get_returncode:
logging.warn("Warning: installation of %s failed" % " ".join(packages))
logging.warning("Warning: installation of %s failed"
% " ".join(packages))
if not upgrade_mode:
_close_notification(installing_notification_id)
_notify_failure(_("The installation of your additional software "
......@@ -576,7 +580,7 @@ def upgrade_additional_packages():
apt_get_returncode = _launch_apt_get(["update"])
if apt_get_returncode:
logging.warn("Warning: the update failed.")
logging.warning("Warning: the update failed.")
_notify_failure(_("The check for upgrades of your additional software "
"failed"),
_("Please check your network connection, "
......@@ -606,7 +610,7 @@ def upgrade_additional_packages():
# must have been upgraded already.
apt_get_returncode = _launch_apt_get(["autoclean"])
if apt_get_returncode:
logging.warn("Warning: autoclean failed.")
logging.warning("Warning: autoclean failed.")
return True
......@@ -635,10 +639,10 @@ if __name__ == "__main__":
else:
log_level = logging.INFO
log_format = "[%(levelname)s] %(message)s"
syslog_handler = logging.handlers.SysLogHandler(address="/dev/log")
stderr_handler = logging.StreamHandler()
file_handler = logging.FileHandler(ASP_LOG_FILE)
logging.basicConfig(format=log_format,
handlers=[syslog_handler, file_handler],
handlers=[stderr_handler, file_handler],
level=log_level)
gettext.install("tails")
......
......@@ -2,7 +2,7 @@
import sys
from tailslib.additionalsoftware.config import (
from tailslib.additionalsoftware import (
remove_additional_packages,
get_additional_packages)
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig>
<vendor>Tails</vendor>
<vendor_url>http://tails.boum.org/</vendor_url>
<action id="org.boum.tails.additional-software.remove">
<description>Remove an additional software package</description>
<description xml:lang="bn_BD">একটি অতিরিক্ত সফটওয়্যার প্যাকেজ অপসারণ করুন</description>
<description xml:lang="ca">Elimineu un paquet de programari addicional</description>
<description xml:lang="da">Fjern en pakke med yderligere software</description>
<description xml:lang="de">Entfernen Sie ein zusätzliches Software-Paket</description>
<description xml:lang="el">Αφαίρεση πρόσθετου πακέτου λογισμικού</description>
<description xml:lang="es">Retirar un paquete de software adicional</description>
<description xml:lang="es_AR">Remover un programa adicional</description>
<description xml:lang="ga">Bain ceann de na bogearraí breise atá agat</description>
<description xml:lang="he">הסר חבילה של תוכנה נוספת</description>
<description xml:lang="it">Rimuovi un pacchetto di software aggiuntivo</description>
<description xml:lang="pt_BR">Remover um pacote de software adicional</description>
<description xml:lang="tr">Bir ek yazılım paketini kaldır</description>
<message>Authentication is required to remove a package from your additional software ($(command_line))</message>
<message xml:lang="bn_BD">আপনার অতিরিক্ত সফ্টওয়্যার থেকে একটি প্যাকেজ অপসারণ করতে প্রত্যয়ন আবশ্যক ($(command_line))</message>
<message xml:lang="ca">Es necessita l'autenticació per eliminar un paquet del programari addicional ($ (command_line))</message>
<message xml:lang="da">Der kræves autentifikation for at fjerne en pakke fra dine yderligere software ($(command_line))</message>