Milan Broz
f51c7b62db
Replace locked device with error target after 1 sec of waiting.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@113 36d66b0a-2a48-0410-832c-cd162a569da5
2009-09-20 18:02:41 +00:00
Milan Broz
ecf46df00e
Fix manpage to not require --size which expands to device size by default. (Thanks to Oren Held)
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@112 36d66b0a-2a48-0410-832c-cd162a569da5
2009-09-15 15:10:34 +00:00
Milan Broz
935e83ebfa
Initialize crypto library before LUKS header load.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@111 36d66b0a-2a48-0410-832c-cd162a569da5
2009-09-15 15:10:23 +00:00
Milan Broz
1e7d8afc99
Fix typo in help text.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@110 36d66b0a-2a48-0410-832c-cd162a569da5
2009-09-11 10:17:54 +00:00
Milan Broz
1cc33f943e
patch 1.patch
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@109 36d66b0a-2a48-0410-832c-cd162a569da5
2009-09-10 12:41:18 +00:00
Milan Broz
e479b0988f
Use selinux libs only when needed (fixes previous commit).
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@108 36d66b0a-2a48-0410-832c-cd162a569da5
2009-09-08 13:08:36 +00:00
Milan Broz
76d7fab0c7
Add dirty hack to properly compile static binary with selinux and libgcrypt.
...
(unfortunately libgcrypt-config --libs have no --static switch...)
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@107 36d66b0a-2a48-0410-832c-cd162a569da5
2009-09-08 12:53:00 +00:00
Milan Broz
dfadce6d80
Try to read first sector from device to properly check that device is ready.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@106 36d66b0a-2a48-0410-832c-cd162a569da5
2009-09-08 10:29:50 +00:00
Milan Broz
a47856ac49
Use dm-uuid for all crypt devices, contains device type and name now.
...
DM_UUID now contains prefix (CRYPT-), device type (LUKS1, PLAIN, TEMP),
UUID (if provided - LUKS) and device name.
Because e.g. snapshot of full LUKS device during activation must have different
name, DM-UUID is different too and we do not need --disable-uuid option.
DM-UUID is persistent during activation time.
* Revert (and solve different way): Replace not safe option --non-exclusive with --disable-uuid.
Signed-off-by: Milan Broz <mbroz@redhat.com >
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@105 36d66b0a-2a48-0410-832c-cd162a569da5
2009-09-08 06:41:44 +00:00
Milan Broz
3cea5dcc7b
* Add luksSuspend (freeze device and wipe key) and luksResume (with provided passphrase).
...
Signed-off-by: Milan Broz <mbroz@redhat.com >
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@104 36d66b0a-2a48-0410-832c-cd162a569da5
2009-09-02 12:47:21 +00:00
Milan Broz
52b0271a0e
Disable --non-exclusive test.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@103 36d66b0a-2a48-0410-832c-cd162a569da5
2009-08-31 17:15:07 +00:00
Milan Broz
bcd94f6ad4
Add LUKS open and format test using new api.
...
Fix some error messages.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@102 36d66b0a-2a48-0410-832c-cd162a569da5
2009-08-31 17:03:22 +00:00
Milan Broz
771db939ad
* Replace not safe option --non-exclusive with --disable-uuid.
...
(just formal change, code already contains the change)
Signed-off-by: Milan Broz <mbroz@redhat.com >
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@101 36d66b0a-2a48-0410-832c-cd162a569da5
2009-08-31 17:03:10 +00:00
Milan Broz
8a0553d452
Add plain crypt device test using new API.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@100 36d66b0a-2a48-0410-832c-cd162a569da5
2009-08-31 10:36:36 +00:00
Milan Broz
c878e56237
* Add --master-key-file option for luksFormat and luksAddKey.
...
Signed-off-by: Milan Broz <mbroz@redhat.com >
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@99 36d66b0a-2a48-0410-832c-cd162a569da5
2009-08-30 18:10:23 +00:00
Milan Broz
3deabc8e56
* Remove old API code helper functions.
...
Signed-off-by: Milan Broz <mbroz@redhat.com >
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@98 36d66b0a-2a48-0410-832c-cd162a569da5
2009-08-30 18:10:11 +00:00
Milan Broz
7bc5829c43
* Implement old API calls using new functions.
...
Signed-off-by: Milan Broz <mbroz@redhat.com >
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@97 36d66b0a-2a48-0410-832c-cd162a569da5
2009-08-30 18:10:02 +00:00
Milan Broz
d70782478e
* Add new libcryptsetup API (documented in libcryptsetup.h).
...
Signed-off-by: Milan Broz <mbroz@redhat.com >
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@96 36d66b0a-2a48-0410-832c-cd162a569da5
2009-08-30 18:09:53 +00:00
Milan Broz
344a162a29
* Replace global options struct with separate parameters in helper functions.
...
Signed-off-by: Milan Broz <mbroz@redhat.com >
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@95 36d66b0a-2a48-0410-832c-cd162a569da5
2009-08-30 18:09:43 +00:00
Milan Broz
74b26c7b8a
* Run performance check for PBKDF2 from LUKS code, do not mix hash algoritms results.
...
* Add ability to provide pre-generated master key and UUID in LUKS header format.
* Add LUKS function to verify master key digest.
* Move key slot manuipulation function into LUKS specific code.
Signed-off-by: Milan Broz <mbroz@redhat.com >
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@94 36d66b0a-2a48-0410-832c-cd162a569da5
2009-08-30 18:09:34 +00:00
Milan Broz
cee0f0b49f
* Move device utils code and provide context parameter (for log).
...
* Keyfile now must be provided by path, only stdin file descriptor is used (api only).
* Do not call isatty() on closed keyfile descriptor.
Signed-off-by: Milan Broz <mbroz@redhat.com >
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@93 36d66b0a-2a48-0410-832c-cd162a569da5
2009-08-30 18:09:21 +00:00
Milan Broz
bf7819ccef
* Add log macros and make logging modre consitent.
...
* Move command successful messages to verbose level.
* Introduce --debug parameter.
Signed-off-by: Milan Broz <mbroz@redhat.com >
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@92 36d66b0a-2a48-0410-832c-cd162a569da5
2009-08-30 18:07:17 +00:00
Milan Broz
4e471a9b03
* Move memory locking and dm initialization to command layer.
...
* Increase priority of process if memory is locked.
Signed-off-by: Milan Broz <mbroz@redhat.com >
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@91 36d66b0a-2a48-0410-832c-cd162a569da5
2009-08-30 18:07:00 +00:00
Milan Broz
ab953b3ff6
Require device device-mapper to build and do not use backend wrapper for dm calls.
...
Signed-off-by: Milan Broz <mbroz@redhat.com >
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@90 36d66b0a-2a48-0410-832c-cd162a569da5
2009-08-30 17:56:33 +00:00
Milan Broz
5c42db87bf
Test commit.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@89 36d66b0a-2a48-0410-832c-cd162a569da5
2009-08-30 17:49:37 +00:00
Milan Broz
04a0f5dfb8
Fix include path.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@88 36d66b0a-2a48-0410-832c-cd162a569da5
2009-08-28 15:54:03 +00:00
Milan Broz
b30c1c7f43
Add separate tests directory, move LUKS tests, Add old library API tests.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@87 36d66b0a-2a48-0410-832c-cd162a569da5
2009-08-28 15:22:37 +00:00
Milan Broz
d980dbb300
Allow restrict keys size in LuksOpen (thanks to Stefan Assmann)
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@86 36d66b0a-2a48-0410-832c-cd162a569da5
2009-08-17 11:04:36 +00:00
Milan Broz
02707608db
Allow using passphrase provided in options struct for LuksOpen (thanks to Waldemar Brodkorb).
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@85 36d66b0a-2a48-0410-832c-cd162a569da5
2009-08-17 11:03:29 +00:00
Milan Broz
a0d1056e0f
Fix PBKDF2 speed calculation for large passhrases.
...
- Do not reset key each iteration.
- Fix error path.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@84 36d66b0a-2a48-0410-832c-cd162a569da5
2009-08-17 06:28:22 +00:00
Milan Broz
a0b795becb
Enable LUKS hash setting and document it.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@83 36d66b0a-2a48-0410-832c-cd162a569da5
2009-07-30 15:02:53 +00:00
Milan Broz
1a10c59b97
Remove internal SHA1 implementation, not needed now.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@82 36d66b0a-2a48-0410-832c-cd162a569da5
2009-07-30 15:01:22 +00:00
Milan Broz
88bdb609a8
Move XOR function to af.c, nobody outside of it use it now.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@81 36d66b0a-2a48-0410-832c-cd162a569da5
2009-07-30 14:59:10 +00:00
Milan Broz
ed9e146cb6
Add required parameters for changing hash used in LUKS key setup scheme.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@80 36d66b0a-2a48-0410-832c-cd162a569da5
2009-07-30 14:57:52 +00:00
Milan Broz
7e7c9c176c
Switch PBKDF2 from internal SHA1 to libgcrypt.
...
Also make hash algorithm not fixed here.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@79 36d66b0a-2a48-0410-832c-cd162a569da5
2009-07-30 14:56:59 +00:00
Milan Broz
aab7fecd2e
Return ENOENT for empty keyslots, EINVAL will be used later for other type of errors.
...
(also clean some spaces)
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@78 36d66b0a-2a48-0410-832c-cd162a569da5
2009-07-30 14:55:24 +00:00
Milan Broz
c5c403323e
Remove po/cryptsetup-luks.pot, it's autogenerated (thanks to Ivan Stankovic)
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@77 36d66b0a-2a48-0410-832c-cd162a569da5
2009-07-30 14:48:08 +00:00
Milan Broz
4a257d8c65
Print error when getline() fails (thanks to Ivan Stankovic)
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@76 36d66b0a-2a48-0410-832c-cd162a569da5
2009-07-30 14:46:56 +00:00
Milan Broz
f60475e293
Fix DEBUG output (thanks to Ivan Stankovic)
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@75 36d66b0a-2a48-0410-832c-cd162a569da5
2009-07-30 14:46:20 +00:00
Milan Broz
e3e3027e12
Optimize o_direct read/writes.
...
* Pad luks header to 512 sector size. We need read/write in whole
sector anyway and space is unused (wiped in luksFormat) so there is
no need for read/seek/write exercise.
* Rework read/write blockwise to not split operation to many pieces.
thanks to Sebastian Andrzej Siewior:
The buffer has to be aligned due to the O_DIRECT in open(). Currently a small
blocksize buffer is allocated and everything is read in multiple reads and
copied back to the original buffer. In my case AFEKSize gets computed to 64000
which results in 125 reads with 512 bytes each.
This patch changes this behavior to a single operation where the majority is
read()/write() plus an optional fixup in case the request is not modulo block
size.
* Use posix_memalign and check for alignment if available.
Othewise use old align functions. Add autoconf to detect posix_memalign.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@74 36d66b0a-2a48-0410-832c-cd162a569da5
2009-07-28 09:29:13 +00:00
Milan Broz
a3c8571df0
Fix segfault if provided slot in luksKillslot is invalid.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@73 36d66b0a-2a48-0410-832c-cd162a569da5
2009-07-23 11:04:46 +00:00
Milan Broz
ea0ee83025
Remove unneeded timeout when remove of temporary device succeeded.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@72 36d66b0a-2a48-0410-832c-cd162a569da5
2009-07-22 20:21:49 +00:00
Milan Broz
aecd010c3b
Cryptsetup version 1.0.7.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@66 36d66b0a-2a48-0410-832c-cd162a569da5
2009-07-22 10:43:40 +00:00
Milan Broz
fc2cfe7a32
Allow removal of last slot in luksRemoveKey and luksKillSlot.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@65 36d66b0a-2a48-0410-832c-cd162a569da5
2009-07-16 12:59:00 +00:00
Milan Broz
eccc31e9ad
Add --disable-selinux option and fix static build if selinux is required.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@64 36d66b0a-2a48-0410-832c-cd162a569da5
2009-07-12 21:37:03 +00:00
Milan Broz
0bc3ffae8b
Reject unsupported --offset and --skip options for luksFormat and update man page.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@63 36d66b0a-2a48-0410-832c-cd162a569da5
2009-07-11 07:09:05 +00:00
Milan Broz
c0d99e98e4
cryptsetup 1.0.7-rc1
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@60 36d66b0a-2a48-0410-832c-cd162a569da5
2009-06-22 14:13:40 +00:00
Milan Broz
78cd6786fb
Add some checks for error codes.
...
(fixes warning: ignoring return value ...)
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@59 36d66b0a-2a48-0410-832c-cd162a569da5
2009-06-22 12:40:31 +00:00
Milan Broz
3691b36caa
Fix device prompt quistion.
...
(fixes missing patch chunk in previous commit)
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@58 36d66b0a-2a48-0410-832c-cd162a569da5
2009-06-22 12:38:08 +00:00
Milan Broz
9ed9ba3d85
Define device-mapper crypt UUID maximal length and check for its size.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@57 36d66b0a-2a48-0410-832c-cd162a569da5
2009-06-21 10:02:10 +00:00