Commit Graph

247 Commits

Author SHA1 Message Date
Alexandre Pujol
a200448de2 Add tomb resize support for GPG key 2017-02-03 23:57:52 +00:00
Alexandre Pujol
47ddeebbc4 Add support to change the GPG key used to encrypt a tomb key. (tomb passwd) 2017-02-03 23:57:52 +00:00
Alexandre Pujol
5a35ab9668 Improve key encryption/decryption using GPG key.
Decryption/Encryption works without these improvment, however, there
are needed in order to have clean key (without empty line).

Moreover, tests showed not doing cause troubles when changing the GPG key
used to encrypt a tomb key.
2017-02-03 23:57:52 +00:00
Alexandre Pujol
8f8dc0a0d4 Improve exhumation of key when opening a tomb 2017-02-03 23:57:52 +00:00
Alexandre Pujol
b23e9aa028 Add --tomb-pwd support for GPG key on steganography functions 2017-02-03 23:57:52 +00:00
Alexandre Pujol
d1b016b3c1 Add GPG recipient support for steganography function (bury and exhume)
The tomb policy is to use the same password to encrypt
the key and to bury it. However, steganography cannot be
done with GPG key. Therefore, we check the user can
decrypt the tomb with its GPG key and we ask for a
steganography password. Having different method is a
technical requirement and should enhance security.
2017-02-03 23:57:52 +00:00
Alexandre Pujol
2d516cbaed Check if the GPG key given is a valid.
Add the function 'is_valid_recipients'
A key is valid if both public and private keys are present
in the GPG database
2017-02-03 23:57:52 +00:00
Alexandre Pujol
902860fd9f Add GPG recipient support when generating a new tomb key 2017-02-03 23:57:52 +00:00
Alexandre Pujol
6c0d89cab1 Use -r option to shortcut interactive tomb password popup 2017-02-03 23:57:52 +00:00
Alexandre Pujol
9ee0a1550e Add -r option to enable GPG key integration.
The flag -r (for recipient like in GPG itself) takes a mandatory
argument, the GPG key ID.
2017-02-03 23:57:52 +00:00
Jaromil
9110ccd9d1 really use key-size 512 on luksFormat 2017-01-29 21:54:46 +01:00
Jaromil
7a98ee8ba6 change forged key lenght to 512 bits
Addresses issue #238: as 512 bit key length triggers use of AES256.
Apparently so far tombs used AES128 due to key length 256.
Change passes all tests and has no regression implications.
2017-01-21 23:50:57 +01:00
Daniel Rodriguez
42ae73d727 Sync translations with POEditor 2017-01-03 12:00:29 +01:00
Jaromil
843b7fdfc4 remove change of ownership when mounting tombs
The chmod/chown launched on the mounted volume is not really effective
for security, plus the UID is not correctly guessed when tomb is
launched using sudo. It is now up to the user to correctly set
ownership and permission on mounted volumes. There is also one less
check on the ownership of the tomb file which was failing with a
warning in the same case.
2017-01-02 11:04:08 +01:00
Jaromil
cb699189e7 small linting fixes 2017-01-02 06:13:52 +01:00
Jaromil
18743c82a5 code linting
small cleanup using shellcheck, also available as 'make lint'
2017-01-02 06:03:29 +01:00
Jaromil
6f4cfd626c prefer ascii single-quotes to utf8 2017-01-02 06:02:50 +01:00
Jaromil
d41347fe22 documentation updates for release 2016-12-29 19:20:48 +01:00
Jaromil
7b72f07f96 switch shebang to use /usr/bin/env
this is a more generic approach to shebang which supports interpreters
when installed anywhere in the current path.
2016-12-29 13:49:03 +01:00
Jaromil
14cba81f6e fix is_valid_tomb check for already mounted tombs
also added some more verbosity on debug
2016-12-26 20:40:23 +01:00
Jaromil
db976a5210 improve wrapping of key generation
gen_key now avoids adding a final newline to file (addressing #226)
and provides more debugging information from the gpg  process.
2016-12-26 20:19:01 +01:00
Jaromil
f5375c61fe improvement over previous gpg_decrypt fix
now also avoiding the use of `read` shell built-in
2016-12-26 19:04:54 +01:00
Jaromil
df75c39a58 new parsing for gpg_decrypt function
this new parser works with all ZSh versions and brings overall
improvement by eliminating the invocation of exernal binary `grep`
over the secret data.
2016-12-26 12:12:34 +01:00
Jaromil
844a886da1 fix sudo execution (patch by robertmx in #223)
tested also in #228, this stops overwriting the $USERNAME
variable which is not really useful (it was used in the previous
privilege escalation model)
2016-11-18 19:00:47 +01:00
Jaromil
101b89f0be use head directly without cat in post-hooks
less is more...
2016-11-18 13:56:44 +01:00
Jaromil
fa44f46eba better documentation for kdf
also correctly use _failure on fatal error using --kdf
2016-11-18 13:56:44 +01:00
mandeepbhutani
50719fb06f Changed message when encrypted swap found to something more informative
Changed message to detail all swap partitions
2016-10-16 11:40:26 -05:00
Jaromil
8f0b2943ce documentation improvements for kdf and dm-crypt cipher choice 2016-01-09 10:16:42 +01:00
Jaromil
a08cb6e0de forgot to bump the version into the script 2015-12-31 13:33:36 +01:00
Jaromil
46c41f3572 fixes support for bind-hooks paths with whitespace
refactored list_tomb_binds to parse /proc/mounts
also works around Debian's infamous \040(deleted) bug
also minor fix in regex umount for more recent zsh
closes bug #222
2015-12-30 17:33:23 +01:00
Jaromil
15273c9f19 fix to last open date saved
now using /.last in tomb to save and retrieve the time when tomb
was last opened, fixes behaviour with tomb filenames containing dots.
2015-12-30 14:35:58 +01:00
Jaromil
63464fa5ea docs improvement
I'm assuming gettext will approximate a match with the string
without updating all .po files. This is only increasing the length
2015-12-02 16:34:22 +01:00
Jaromil
a9f5a32459 completed transition of all doc strings to mention mebibytes (MiB) 2015-11-25 17:55:54 +01:00
Jaromil
cecde4e116 fixed a typo in EUID check 2015-11-25 17:41:17 +01:00
Jaromil
9090bfaff9 easier to continue resizing if interrupted
if resize is launched at same size, will run partition resize
helps continuing if i.e: pinentry expired waiting for password
after a long resize while operator is away: jurt rerun resize command
2015-11-07 14:20:43 +01:00
Narrat
9dd81b505b Correct spelling and whitespaces 2015-09-21 00:57:21 +02:00
Jaromil
b07224beab fix to username parsing in passwd
now using getent, light edit of hellekin's fix in #198
2015-07-23 15:18:13 +02:00
Emil Lundberg
4730b6d211 Fix comment typo: --use-random => --use-urandom 2015-07-07 09:56:16 +02:00
Jaromil
b8447dbf24 documentation update and small swish-e fix
The fix is due to the new naming scheme without .tomb extension recently
introduced for mountpoints. While testing this a problem arised with
swish-e related to compression of indexes, to be addressed.
2015-07-06 17:33:44 +02:00
Jaromil
e8ca2998b9 improved debugging for pinentry execution 2015-07-04 11:28:37 +02:00
Jaromil
55d3263cac Parse only untranslated GNUPG output
this avoids getting in the way utf8 chars like non-breakable space
that will hang ZSh in versions previous to 5.0.8, fix #205
2015-07-02 12:47:29 +02:00
Jaromil
eada0538c9 Delete mountpoint when tomb is closed (fix #149)
two bugs were left behind by the last refactoring, one about
consistency of the mountpoint naming (now using $TOMBNAME everywhere,
without the added .tomb extension as per #180), the other about a
missing _sudo to prefix rmdir commands.

Test suite has been updated accordingly.

This fix introduces a mandatory condition for the next update: all
tombs must be closed when upgrading the tomb script, else it will not
be able to correctly close them.
2015-06-26 11:47:19 +02:00
Jim Turner
1dff3676ce Remove inaccurate comment 2015-03-01 02:17:48 -05:00
Jim Turner
1919b29c1f Remove unused variable 2015-03-01 02:17:48 -05:00
hellekin
8aa1c0c6a5 Clarify code and documentation (thanks @boyska) 2015-02-21 23:04:50 -03:00
boyska
5f3ec68c38 FIX kdf iteration count 2015-02-20 19:03:21 +01:00
hellekin
fe504e4a19 Remove tabs 2015-02-20 11:42:49 +01:00
hellekin
8233278ce0 Remove leftover and notify #163 :) 2015-02-20 11:42:49 +01:00
hellekin
bad0173352 Simplify patch 2015-02-20 11:42:49 +01:00
hellekin
e4afe6aefa Recover legacy code for systems using util-linux < 2.22 2015-02-20 11:42:49 +01:00