Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
tails
tails
Commits
d18ec9c1
Commit
d18ec9c1
authored
Sep 23, 2010
by
amnesia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP: start Tor and Vidalia only once HTP is done.
parent
9408c51f
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
79 additions
and
20 deletions
+79
-20
config/amnesia
config/amnesia
+1
-1
config/chroot_local-includes/etc/NetworkManager/dispatcher.d/50-htp.sh
..._local-includes/etc/NetworkManager/dispatcher.d/50-htp.sh
+10
-0
config/chroot_local-includes/etc/NetworkManager/dispatcher.d/60-tor-sighup.sh
...includes/etc/NetworkManager/dispatcher.d/60-tor-sighup.sh
+12
-8
config/chroot_local-includes/etc/skel/.config/autostart/vidalia.desktop
...local-includes/etc/skel/.config/autostart/vidalia.desktop
+0
-10
config/chroot_local-includes/usr/local/bin/amnesia-htp-notify-user
...root_local-includes/usr/local/bin/amnesia-htp-notify-user
+50
-0
config/chroot_local-includes/usr/local/bin/amnesia-security-check-wrapper
...cal-includes/usr/local/bin/amnesia-security-check-wrapper
+5
-0
wiki/src/todo/make_it_clear_when_waiting_for_HTP.mdwn
wiki/src/todo/make_it_clear_when_waiting_for_HTP.mdwn
+1
-1
No files found.
config/amnesia
View file @
d18ec9c1
...
...
@@ -15,7 +15,7 @@
AMNESIA_BASE
=
"gnome"
# Base for the string that will be passed to "lh config --bootappend-live"
AMNESIA_APPEND
=
"quiet splash vga=788 live-media=removable nopersistent noprompt=usb"
AMNESIA_APPEND
=
"quiet splash vga=788 live-media=removable nopersistent noprompt=usb
sysv-rc=tor
"
# Options passed to isohybrid
# Default: "-entry 4 -type 1c"
...
...
config/chroot_local-includes/etc/NetworkManager/dispatcher.d/50-htp.sh
View file @
d18ec9c1
...
...
@@ -33,6 +33,14 @@ fi
LOG
=
/var/log/nm-htp.log
HTPDATE_LOG
=
/var/log/htpdate.log
DONE_FILE
=
/var/lib/live/htp-done
if
[
-e
"
${
DONE_FILE
}
"
]
;
then
exit
0
fi
export
DISPLAY
=
':0.0'
exec
/bin/su
-c
/usr/local/bin/amnesia-htp-notify-user amnesia &
declare
-a
HTP_POOL
HTP_POOL
=(
...
...
@@ -116,4 +124,6 @@ echo "htpdate exited with return code ${HTPDATE_RET}" >>$LOG
cleanup_etc_hosts
touch
"
${
DONE_FILE
}
"
exit
${
HTPDATE_RET
}
config/chroot_local-includes/etc/NetworkManager/dispatcher.d/60-tor-sighup.sh
View file @
d18ec9c1
...
...
@@ -12,19 +12,23 @@ fi
PIDFILE
=
/var/run/tor/tor.pid
# We don't start Tor automatically anymore so *this* is the time when
# it is supposed to start.
if
[
-r
"
${
PIDFILE
}
"
]
;
then
# A SIGHUP should be enough but there's a bug in Tor. Details:
# * https://bugs.torproject.org/flyspray/index.php?do=details&id=1247
# * https://amnesia.boum.org/bugs/tor_vs_networkmanager/
invoke-rc.d tor restart
# Restart Vidalia because it does not automatically reconnect to the new
# Tor instance. Use kill+start as X-GNOME-AutoRestart does not exist in
# Lenny's Gnome.
if
killall vidalia
;
then
sleep
2
# give lckdo a chance to release the lockfile
export
DISPLAY
=
':0.0'
exec
/bin/su
-c
/usr/local/bin/vidalia-wrapper amnesia &
fi
else
invoke-rc.d tor start
fi
# Restart Vidalia because it does not automatically reconnect to the new
# Tor instance. Use kill+start as:
# - X-GNOME-AutoRestart does not exist in Lenny's Gnome
# - we do not start Vidalia automatically anymore and *this* is the time
# when it is supposed to start.
killall vidalia
sleep
2
# give lckdo a chance to release the lockfile
export
DISPLAY
=
':0.0'
exec
/bin/su
-c
/usr/local/bin/vidalia-wrapper amnesia &
config/chroot_local-includes/etc/skel/.config/autostart/vidalia.desktop
deleted
100644 → 0
View file @
9408c51f
[Desktop Entry]
Version=1.0
Name=Vidalia
GenericName=GUI controller for Tor Onion Routing Network
Comment=GUI controller for Tor Onion Routing Network
Exec=/usr/local/bin/vidalia-wrapper
Terminal=false
Type=Application
Icon=/usr/share/pixmaps/vidalia.xpm
Categories=Network;Qt;Security;
config/chroot_local-includes/usr/local/bin/amnesia-htp-notify-user
0 → 100755
View file @
d18ec9c1
#!/usr/bin/perl
use
strict
;
use
warnings
;
#man{{{
=head1 NAME
amnesia-htp-notify-user
=head1 VERSION
Version X.XX
=head1 AUTHOR
T(A)ILS dev team <amnesia@boum.org>
See https://amnesia.boum.org/.
=cut
#}}}
use
Desktop::
Notify
;
use
Locale::
gettext
;
use
POSIX
;
### initialization
setlocale
(
LC_MESSAGES
,
"");
textdomain
("
amnesia-htp-notify-user
");
my
$htp_done_file
=
'
/var/lib/live/htp-done
';
### main
my
$notify
=
Desktop::
Notify
->
new
();
my
$summary
=
gettext
("
Synchronizing the system's clock
");
my
$body
=
gettext
("
Tor needs an accurate clock to work properly. Please wait...
");
my
$notification
=
$notify
->
create
(
summary
=>
$summary
,
body
=>
$body
,
timeout
=>
0
);
exit
0
if
-
e
$htp_done_file
;
$notification
->
show
();
until
(
-
e
$htp_done_file
)
{
sleep
1
;
}
$notification
->
close
();
config/chroot_local-includes/usr/local/bin/amnesia-security-check-wrapper
View file @
d18ec9c1
#!/bin/sh
# wait for HTP to finish
until
[
-e
/var/lib/live/htp-done
]
;
do
sleep
1
done
sleep
120
exec
/usr/local/bin/amnesia-security-check
wiki/src/todo/make_it_clear_when_waiting_for_HTP.mdwn
View file @
d18ec9c1
[[!tag todo/
code
]]
[[!tag todo/
test
]]
The Tor connection is not fully functionnal until the HTP has been
completed. The user should be informed s/he must wait.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment