summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/chroot_local-includes/usr/local/lib/tails-shell-library/chroot-browser.sh19
-rwxr-xr-xconfig/chroot_local-includes/usr/local/sbin/unsafe-browser6
-rw-r--r--features/support/helpers/vm_helper.rb2
-rw-r--r--features/test.feature6
4 files changed, 26 insertions, 7 deletions
diff --git a/config/chroot_local-includes/usr/local/lib/tails-shell-library/chroot-browser.sh b/config/chroot_local-includes/usr/local/lib/tails-shell-library/chroot-browser.sh
index 90c6df5..6930a7e 100644
--- a/config/chroot_local-includes/usr/local/lib/tails-shell-library/chroot-browser.sh
+++ b/config/chroot_local-includes/usr/local/lib/tails-shell-library/chroot-browser.sh
@@ -21,7 +21,7 @@ try_cleanup_browser_chroot () {
local user="${3}"
try_for 10 "pkill -u ${user} 1>/dev/null 2>&1" 0.1 || \
pkill -9 -u "${user}" || :
- for mnt in "${chroot}/dev" "${chroot}/proc" "${chroot}" "${cow}"; do
+ for mnt in "${chroot}/dev" "${chroot}/proc" "${chroot}/run/dbus" "${chroot}" "${cow}"; do
try_for 10 "umount ${mnt} 2>/dev/null" 0.1
done
rmdir "${cow}" "${chroot}"
@@ -62,6 +62,9 @@ setup_chroot_for_browser () {
mount --bind "/dev" "${chroot}/dev" || \
return 1
+ mkdir -p "${chroot}/run/dbus"
+ mount --rbind "/run/dbus" "${chroot}/run/dbus"
+
# Workaround for #6110
chmod -t "${cow}"
}
@@ -244,9 +247,15 @@ run_browser_in_chroot () {
local profile="$(browser_profile_dir ${browser_name} ${chroot_user})"
sudo -u "${local_user}" xhost "+SI:localuser:${chroot_user}"
- chroot "${chroot}" sudo -u "${chroot_user}" /bin/sh -c \
- ". /usr/local/lib/tails-shell-library/tor-browser.sh && \
- exec_firefox -DISPLAY='${DISPLAY}' \
- -profile '${profile}'"
+ #XAUTHORITY="${XAUTHORITY}"
+ chroot "${chroot}" \
+ pkexec --user "${chroot_user}" \
+ env DISPLAY="${DISPLAY}" \
+ /bin/sh -c \
+ "gedit"
+# ". /usr/local/lib/tails-shell-library/tor-browser.sh && \
+# exec_firefox -DISPLAY='${DISPLAY}' \
+# -profile '${profile}'"
+
sudo -u "${local_user}" xhost "-SI:localuser:${chroot_user}"
}
diff --git a/config/chroot_local-includes/usr/local/sbin/unsafe-browser b/config/chroot_local-includes/usr/local/sbin/unsafe-browser
index 81211f2..272b8b9 100755
--- a/config/chroot_local-includes/usr/local/sbin/unsafe-browser
+++ b/config/chroot_local-includes/usr/local/sbin/unsafe-browser
@@ -110,6 +110,7 @@ fi
# FIXME: Or would it make sense to fallback to Google's DNS or OpenDNS?
# Some stupid captive portals may allow DNS to any host, but chances are
# that only the portal's DNS would forward to the login page.
+IP4_NAMESERVERS='10.1.1.1'
if [ -z "${IP4_NAMESERVERS:-}" ]; then
error "`gettext \"No DNS server was obtained through DHCP or manually configured in NetworkManager.\"`"
fi
@@ -127,6 +128,9 @@ configure_chroot_browser "${CHROOT}" "${BROWSER_USER}" "${BROWSER_NAME}" \
"${TBB_EXT}"/langpack-*.xpi || \
error "`gettext \"Failed to configure browser.\"`"
+#echo XXX
+#read A
+
echo "* Starting Unsafe Browser"
run_browser_in_chroot "${CHROOT}" "${BROWSER_NAME}" "${BROWSER_USER}" \
"${SUDO_USER}" || \
@@ -134,6 +138,6 @@ run_browser_in_chroot "${CHROOT}" "${BROWSER_NAME}" "${BROWSER_USER}" \
echo "* Exiting the Unsafe Browser"
show_shutdown_notification
-maybe_restart_tor
+#maybe_restart_tor
exit 0
diff --git a/features/support/helpers/vm_helper.rb b/features/support/helpers/vm_helper.rb
index 72448f3..975a52d 100644
--- a/features/support/helpers/vm_helper.rb
+++ b/features/support/helpers/vm_helper.rb
@@ -527,7 +527,7 @@ EOF
end
def file_overwrite(*args)
- execute_successfully("rm -f '#{args.first}'")
+ execute_successfully("truncate -s 0 '#{args.first}'")
file_append(*args)
end
diff --git a/features/test.feature b/features/test.feature
new file mode 100644
index 0000000..a3c5b47
--- /dev/null
+++ b/features/test.feature
@@ -0,0 +1,6 @@
+@product
+Feature: test
+
+ Scenario:
+ Given I have started Tails from DVD without network and logged in
+ When blah