Commit Graph

162 Commits

Author SHA1 Message Date
Anathema
20c1097281 feature request #21, now slam_tomb() tries to kill 3 times the pids holding the tomb, workflow:
1- kill -SIGUSR1
2- if there are remaining pids, wait 3 secs to get harder
3- kill -SIGTERM
4- if there are remaining pids, wait 3 secs to kill 'em all
5- kill -SIGKILL
2011-08-16 02:52:01 +02:00
Anathema
afd785be62 fixed issue #20: created slam_tomb() that take cares about killing and checking pids 2011-08-16 02:43:15 +02:00
boyska
a252f62fba Fix #14: problems with spaces in option arguments 2011-08-02 02:55:00 +02:00
boyska
d5ca1885ca [Optparsing] do a shift to delete subcommand 2011-08-02 02:55:00 +02:00
boyska
6495099344 [Optparsing] Support options in whatever position
However, it has a precondition that developers MUST respect:
  An option CAN'T have differente meanings/behaviour in different subcommands.
  For example, "-s" means "size" and accept an argument. If you are tempted to add
  an option "-s" (that means, for example "silent", and doesn't accept an argument)
This, however, make sense even from an usability point of view.
Also, option with optional argument are prohibited.

The technique is a "double scan": first, we scan options passing
_every_ possible subcommand options to zparseopts.
This way, we can distinguish between option argument and parameters.
So, we recognize which is the subcommand.
Then, parse again
2011-08-02 02:55:00 +02:00
boyska
d0e004412d Changing optparsing, tomb-open needs changes
It was putting the option BEFORE the subcommand.
However, the new method supports this only partially:
* Boolean options can be put before the subcommand
* Subcommand-specific options that take an argument can be put before the
  subcommand, only in the
  form  -kvalue ; using -k value gives an error
* Global options can always be put before the subcommand

Therefore, we'll say that options MUST go after the subcommand (to stay sure)
2011-08-02 02:55:00 +02:00
boyska
89d4b8d8d0 Optparsing: add other commands
Now all commands should have been ported
2011-08-02 02:55:00 +02:00
BoySka
c71bd81af2 New optparsing, with zparseopts
* parameters can be added where you want
* it's possible to use long options
* you can have "synonim" options
* it has potential for a recursive implementation
2011-08-02 02:54:17 +02:00
DJR
58e2b26694 Merge pull request #16 from davinerd/dependencies
all dependencies are checked for at startup
2011-08-01 13:32:54 -07:00
Anathema
d4de059e39 added cryptsetup and pinentry binary checks to check_bin() 2011-08-01 22:14:23 +02:00
Anathema
3f0d3dabfc fixed issue #3: a simple file check on the key is now performed before creating the tomb 2011-08-01 22:11:57 +02:00
Jaromil
bdef8853d5 better close messages 2011-05-26 18:38:36 +02:00
Jaromil
5b8235201c TODO and VERSION update 2011-05-26 13:16:02 +02:00
Jaromil
bf9cc3070d refuses to open a tomb that is already open 2011-05-26 13:15:03 +02:00
Jaromil
e9e584a9c2 better dialogs, also for tomb-open 2011-05-26 13:00:30 +02:00
Jaromil
2c26903206 tomb list now output also size and usage information 2011-05-26 12:24:17 +02:00
Jaromil
3baa72b5a5 new -o flag to manually specify mount(8) options used in tomb open
updated documentation
2011-05-24 12:04:18 +02:00
Jaromil
130c98f1fe correctly set ownership to user on newly created tombs 2011-05-24 11:18:22 +02:00
Jaromil
16f0412817 Merge branch 'debian0' 2011-05-23 22:30:39 +02:00
Jaromil
2e2fcabb0a fix to close a tomb that is open twice on the same mountpoint 2011-05-23 22:28:22 +02:00
Jaromil
7d535e7491 kill only if status found running 2011-05-15 20:12:15 +02:00
Jaromil
85b01ddbcf kill the status tray when closed from cli 2011-05-15 20:11:01 +02:00
Jaromil
ccdd2aa4d6 fixed slam for a single tomb
still need to debug "tomb slam all"
2011-05-15 20:03:11 +02:00
Jaromil
1affad00d5 fix permissions of new tomb
and notice if tomb hasn't right permissions

in future we should check permissions of tomb from the suid commandline
this way we can also change its permissions and make it ours
2011-05-13 16:31:25 +02:00
mancausoft
6cb3571ed9 Fixed tombsize_4k 2011-05-10 15:44:03 +02:00
Jaromil
b62df89eea little usability fixes 2011-05-10 09:26:07 +02:00
Jaromil
65b2fe4462 internationalization
now the internal command tomb translate
generates a list of strings used inside tomb ready for translation
(as a .po file)

help needed: translations and autotools integration
2011-05-09 14:06:30 +02:00
Jaromil
cb9a6bf730 substituted echo with print in code
this will avoid spawning an extra echo process each time
print is a zsh builtin, an alternative to the use of <<< suggested by anathema
2011-05-09 11:00:47 +02:00
Jaromil
052549a4f9 colors! :) and documentation for tomb list 2011-05-09 10:32:08 +02:00
Jaromil
3ef6398019 new tomb list command 2011-05-09 09:11:18 +02:00
boyska
25333c5bb0 Fixes 1594b2c :usage of 'try()' in tomb
it is defined in tomb-open, but not in tomb
2011-05-07 00:19:05 +02:00
boyska
1594b2c825 safe_dir supports mktemp
if available, use it. otherwise, keep using our hack
2011-05-05 10:17:56 +02:00
boyska
0095a89d4d Key generation provides better feedback 2011-05-05 10:17:42 +02:00
Jaromil
d2d86686a8 fixed expr bug and added tomb mktemp internal command 2011-04-28 20:42:45 +02:00
Jaromil
461b50b930 removed dependency from bc
now expr is used
2011-04-28 13:03:46 +02:00
Jaromil
a42567432d fixes to indentation and whitespace cleanup 2011-04-28 12:15:35 +02:00
Jaromil
449d6ae61a fixes to tomb close 2011-04-28 12:15:25 +02:00
Jaromil
8771d103b7 Added slam command
exposed as command the implementation by Anathema: kills all
processes using the tomb (denying it to be closed) and umounts

tomb (the commandline script) is not supposed to be interactive
we leave interactivity to be implemented by wrappers as tomb-open
so it should stop to ask the used if to slam, rather than offer
it as a command. now also tomb-status has the menu option to slam.
2011-04-28 00:58:47 +02:00
Jaromil
27a8bf2830 removed backup
was just an experiment and not interesting
users can better choose their own backup system
and be in complete control of the process
2011-04-27 20:59:49 +02:00
Anathema
569a4d341f improvements 2011-04-27 11:34:39 +02:00
Anathema
1b38029474 Some critical changes in umount_tomb() and some other small fixies 2011-04-27 11:33:10 +02:00
Anathema
64f8df26a0 Some general bug fix 2011-04-27 11:32:19 +02:00
Asbesto
521ff6b829 Pinentry dava errore di parametro LC_CTYPE non definito, e si
piantava con cpu sparata al 100%. Non capiva su quale TTY si
trovava. Per farla breve, necessitava di sti due parametri:
OPTION ttyname=$TTY
OPTION lc-ctype=$LANG
BELLA LI'
2011-04-13 16:59:22 +02:00
Jaromil
ce85f0aaa4 avoid creating targets for hooks
we require users to have the mount targets for hooks already existing
this behaviour is less intrusive in someone's home that is unconscious of hooks
plus it now supports mount bind of normal files
2011-02-25 10:04:54 +01:00
Jaromil
0089f43a4d use GTK2_RC_FILES (thanks fgiunchedi) 2011-02-25 00:35:03 +01:00
Jaromil
de283fde16 close single tomb 2011-02-24 23:01:25 +01:00
Jaromil
f293d89fb8 small fixes and more documentation 2011-02-24 12:26:48 +01:00
Jaromil
cb53eb493d raised version
also url and credits
2011-02-24 11:44:41 +01:00
Jaromil
3a90805127 small fixes to gpg operation
also removed modprobes
2011-02-22 18:30:42 +01:00
Jaromil
81be1fa619 key file extension changed to .tomb.key
rename your keys !
this change was motivated by the fact gpg tends to overwrite the
.tomb file if we decrypt the tomb.gpg by hand. changing the extension
in .tomb.key this doesn't happens.
2011-02-20 20:10:08 +01:00
Jaromil
b521e32110 huge cleanup
tomb shell command doesn't depends from X,
 all GUI notifications are moved into tomb-open including USB key handling,
 gksu has been dropped completely as a method to gain privileges,
 there is a new -n flag to avoid processing hooks,
 variable names have been sanitized, duplicate code eliminated,
 documentation has been updated and the code cleaned up

we are very close to the 1.0 now
2011-02-20 14:59:30 +01:00
Jaromil
fd8df548f4 gtkrc trick for tomb icon
backup properly
2011-02-15 00:19:45 +01:00
Jaromil
b34d379596 backup function using duplicity
working, but hairy since duplicity continues trying to connect
and password handling is not optimal
2011-02-14 15:57:37 +01:00
Jaromil
1a6fd48def cleanup of password entry mechanism
using pinentry (with Assuan protocol) instead of our own askpass
a bit less cooler but much more secure.
this also includes partial normalization of variable names
and the redirection of tomb operational output to stderr.
2011-02-14 10:24:31 +01:00
Jaromil
ddc88e7cec fixed sudo for privilege excalation, gksu is not anymore a requirement
also updated Todo items
2011-02-13 12:29:07 +01:00
Jaromil
eea175b4a7 en/decode steganographic commands are renamed to bury and exhume
documentation updates reflect new features, manpage now refers to arguments of different nature
2011-02-12 17:54:53 +01:00
Hellekin O. Wolf =8)
1c9ec0c4f7 Silence mount error when retrying to close tomb 2011-02-12 12:48:16 +01:00
Hellekin O. Wolf =8)
9e8bd1924b Add support for open/close post-hooks
Now, the post-hooks is passed an argument (open or close) that can be
used to launch commands when the tomb opens or closes, respectively.

This patch also introduces a safer version of bind-hooks that doesn,t
eval the contents, but read a map:

local/to/tomb local/to/HOME

The local/to/HOME is hardly enforced ATM.
2011-02-12 12:38:59 +01:00
Hellekin O. Wolf =8)
2cce47a87f More cleanup 2011-02-12 12:33:45 +01:00
Hellekin O. Wolf =8)
905550657b Typos 2011-02-12 12:33:45 +01:00
Hellekin O. Wolf =8)
f14b31ad59 Cleanup after ourselves 2011-02-12 12:33:45 +01:00
Hellekin O. Wolf =8)
078f44160a One tool doing one thing and doing it well :) 2011-02-12 12:33:45 +01:00
Hellekin O. Wolf =8)
20170b2efb Fix opening when device identification is^Hwas too slow 2011-02-12 12:33:45 +01:00
Hellekin O. Wolf =8)
2b0938f6c0 Add decode/encode command info 2011-02-12 09:01:52 +01:00
Hellekin O. Wolf =8)
8891e0e1db Merge master 2011-02-12 08:53:04 +01:00
Hellekin O. Wolf =8)
f408017c07 Prevent directory removals if tomb didn't create them 2011-02-12 08:30:37 +01:00
Hellekin O. Wolf =8)
7756dc1610 notice after error 2011-02-12 08:26:42 +01:00
Jaromil
729e870e0e steganography encoding of keys in images (mostly for key backup)
just from the tomb commandline for now (we start missing a simple GUI wizard eh)

also includes fixes for backward compat (renames tomb volumes after files)
this helps scripts track all mounted tombs via mount -l which prints labels

and some tomb-open wrapper fixes too
2011-02-12 00:36:21 +01:00
Hellekin O. Wolf =8)
0396acd236 More cleanup 2011-02-11 17:45:54 +01:00
Hellekin O. Wolf =8)
a5abc06812 Typos 2011-02-11 17:10:56 +01:00
Hellekin O. Wolf =8)
70cb0a39db Cleanup after ourselves 2011-02-11 04:10:16 +01:00
Hellekin O. Wolf =8)
8ec31a1737 One tool doing one thing and doing it well :) 2011-02-11 04:02:40 +01:00
Hellekin O. Wolf =8)
d7b4313b08 Fix opening when device identification is^Hwas too slow 2011-02-11 03:56:09 +01:00
Jaromil
9f8c321a43 some more fixes for the guided generation 2011-02-10 14:59:20 +01:00
Jaromil
c610e6dacc remove debugging stuff 2011-02-10 12:22:11 +01:00
Jaromil
12f92e7aef fixes to ask_usbkey
tested on debian 6
2011-02-09 20:22:39 +01:00
Jaromil
b72a6448a9 using /dev/random as a better source of entropy for key generation 2011-02-08 11:00:09 +01:00
Jaromil
6078356b64 added post-hooks 2011-02-07 11:56:11 +01:00
Jaromil
09d63eac25 new TODO item and better help text 2011-02-07 11:46:22 +01:00
Jaromil
4f3204e1e8 using fork() again and pipefd to pass it arguments
it works now, also the parent process correctly reads the output
2011-02-07 11:27:53 +01:00
Jaromil
e6db14dcfc bind hooks
a file bind-hook in the tomb's root indicated directories to be
mount -o bind when the tomb is opened. tomb close manages to umount them
2011-02-07 09:42:50 +01:00
Jaromil
6b11d2397e documented -q flag 2011-02-03 22:17:06 +01:00
Jaromil
c0bd02a8c0 correct locking of open/close operations
in coordination with tray status presence
and lots more cleanups and testing
2011-02-03 20:42:46 +01:00
Jaromil
465e2f63e5 relevant code cleanup
reenginered priviled escalation
fixed more test cases
2011-02-03 17:11:08 +01:00
Jaromil
613fb37cc7 integrations from the work branch
documentation updates for the 0.9 release
2011-01-30 23:25:01 +01:00
Jaromil
2bff19e0e4 fixes after testing on debian and better documentation 2011-01-30 11:37:50 +01:00
Jaromil
6e51e049c2 correct menu installation 2011-01-29 14:45:03 +01:00
Jaromil
d5f1ce3b2e better ask (y/n) 2011-01-29 14:26:44 +01:00
Jaromil
eac4818f30 manpage, documentation and fixes for the new release
includes also timeout to ask_usbkey, correct naming of tomb
reference documentation for encryption settings, webpage updates and artworks
2011-01-28 12:26:35 +01:00
Jaromil
b40dcff457 tomb notify command for external calls from tomb-open 2011-01-19 12:54:43 +01:00
Jaromil
4475af91a6 removed tomb-notify,
substituted by generic tool notify-send in libnotify-bin package
also minor fixes and docu updates
2011-01-19 12:38:19 +01:00
Jaromil
36565e2ef4 dropped c++ dependency plus various fixes 2011-01-16 23:43:45 +01:00
Jaromil
542bcb1577 check if umount is succesfull
tomb-status now quits only when tomb is really unmounted
2011-01-13 22:35:32 +01:00
Jaromil
505442c394 tomb creation procedure
tomb-open wrapper and further fixes for desktop automatisms
2011-01-13 14:37:52 +01:00
Jaromil
c00a1721c8 desktop installation and mimetypes
and more updates
2011-01-12 17:02:19 +01:00
Jaromil
bd370c1ef5 more code to integrate gui elements and script 2011-01-12 11:38:03 +01:00
Jaromil
0bd8f4b4b6 upgraded version and documentation 2011-01-11 19:30:34 +01:00
Jaromil
587d121ff6 cleanup of old shell code 2011-01-11 19:28:17 +01:00
Jaromil
482c408609 safe wipe of created temp key file 2011-01-11 19:27:30 +01:00
Jaromil
d079876e08 better string trim/crop from whitespaces 2011-01-11 19:18:02 +01:00