summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoranonym <anonym@riseup.net>2015-09-12 12:22:58 +0200
committeranonym <anonym@riseup.net>2016-02-09 17:31:46 +0100
commit695ccf8a98a7b6b883d3bcc7aeec2f5d8b8e0429 (patch)
tree20382ff9aec44721a4acbc318c1c0cc3215d8de8
parenta3076f960449e6f80ba39b0a53d6e62cbed847cd (diff)
Move Tor Launcher env configuration.
It feels like it belongs better in the script where we actually start Tor Launcher than the wrapper that makes root invoke it in the way we want. Also, we have to think less about how sudo propagates environment variables so we can simplify its setup.
-rw-r--r--config/chroot_local-includes/etc/sudoers.d/zzz_tor-launcher1
-rwxr-xr-xconfig/chroot_local-includes/usr/local/bin/tor-launcher10
-rwxr-xr-xconfig/chroot_local-includes/usr/local/sbin/tails-tor-launcher16
3 files changed, 10 insertions, 17 deletions
diff --git a/config/chroot_local-includes/etc/sudoers.d/zzz_tor-launcher b/config/chroot_local-includes/etc/sudoers.d/zzz_tor-launcher
deleted file mode 100644
index 373602b..0000000
--- a/config/chroot_local-includes/etc/sudoers.d/zzz_tor-launcher
+++ /dev/null
@@ -1 +0,0 @@
-Defaults!/usr/bin/tor-launcher always_set_home,env_keep+="TOR_CONFIGURE_ONLY TOR_CONTROL_PORT TOR_CONTROL_COOKIE_AUTH_FILE TOR_FORCE_NET_CONFIG TOR_HIDE_BROWSER_LOGO"
diff --git a/config/chroot_local-includes/usr/local/bin/tor-launcher b/config/chroot_local-includes/usr/local/bin/tor-launcher
index 9bc4167..fb4a8a9 100755
--- a/config/chroot_local-includes/usr/local/bin/tor-launcher
+++ b/config/chroot_local-includes/usr/local/bin/tor-launcher
@@ -6,6 +6,16 @@ set -e
# and configure_best_tor_launcher_locale()
. /usr/local/lib/tails-shell-library/tor-browser.sh
+unset TOR_CONTROL_PASSWD
+unset TOR_FORCE_NET_CONFIG
+export TOR_CONFIGURE_ONLY=1
+export TOR_CONTROL_PORT=9051
+export TOR_CONTROL_COOKIE_AUTH_FILE=/var/run/tor/control.authcookie
+export TOR_HIDE_BROWSER_LOGO=1
+if echo "$@" | grep -qw -- --force-net-config; then
+ export TOR_FORCE_NET_CONFIG=1
+fi
+
PROFILE="${HOME}/.tor-launcher/profile.default"
if [ ! -d "${PROFILE}" ]; then
mkdir -p "${PROFILE}"
diff --git a/config/chroot_local-includes/usr/local/sbin/tails-tor-launcher b/config/chroot_local-includes/usr/local/sbin/tails-tor-launcher
index af7e9b4..0ae6f85 100755
--- a/config/chroot_local-includes/usr/local/sbin/tails-tor-launcher
+++ b/config/chroot_local-includes/usr/local/sbin/tails-tor-launcher
@@ -5,22 +5,6 @@ set -e
# Import export_gnome_env().
. /usr/local/lib/tails-shell-library/gnome.sh
-unset TOR_CONTROL_PASSWD
-unset TOR_FORCE_NET_CONFIG
-TOR_CONFIGURE_ONLY=1
-TOR_CONTROL_PORT=9051
-TOR_CONTROL_COOKIE_AUTH_FILE=/var/run/tor/control.authcookie
-TOR_HIDE_BROWSER_LOGO=1
-export TOR_CONFIGURE_ONLY
-export TOR_CONTROL_PORT
-export TOR_CONTROL_COOKIE_AUTH_FILE
-export TOR_HIDE_BROWSER_LOGO
-
-if echo "$@" | grep -qw -- --force-net-config; then
- TOR_FORCE_NET_CONFIG=1
- export TOR_FORCE_NET_CONFIG
-fi
-
# Get LIVE_USERNAME
. /etc/live/config.d/username.conf