Milan Broz
ddcdd76cc2
Specify copyright holders in source files.
...
Add README notes.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@461 36d66b0a-2a48-0410-832c-cd162a569da5
2011-03-14 14:17:38 +00:00
Milan Broz
d9ba34693f
Add support for automatic loop device use (image infile etc).
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@443 36d66b0a-2a48-0410-832c-cd162a569da5
2011-03-11 19:04:37 +00:00
Milan Broz
0a905364fa
Fix mapping removal if device disappeared but node still exists.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@420 36d66b0a-2a48-0410-832c-cd162a569da5
2011-01-29 15:55:27 +00:00
Milan Broz
66bea4b3be
Add dm flags for query for features.
...
Move adjust device helper to utils.
Fix locking memory message.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@416 36d66b0a-2a48-0410-832c-cd162a569da5
2011-01-25 18:48:41 +00:00
Milan Broz
a70b27762d
Fix some warnings if compiled with clang.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@371 36d66b0a-2a48-0410-832c-cd162a569da5
2010-11-15 16:19:19 +00:00
Milan Broz
b7caa72acd
* Disallow mapping of device which is already in use (mapped or mounted).
...
* Disallow luksFormat on device in use.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@361 36d66b0a-2a48-0410-832c-cd162a569da5
2010-11-05 17:53:33 +00:00
Milan Broz
dfe77be748
* Implement --use-random and --use-urandom for luksFormat to allow setting of RNG for volume key generator.
...
* Add crypt_set_rng_type() and crypt_get_rng_type() to API.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@354 36d66b0a-2a48-0410-832c-cd162a569da5
2010-10-27 15:35:23 +00:00
Milan Broz
3ae161df5d
Move get_key to common code, simplify verify flags.
...
(This code need rewrite anyway).
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@352 36d66b0a-2a48-0410-832c-cd162a569da5
2010-10-26 22:08:02 +00:00
Milan Broz
3a5a1ea0e7
Move safe alloc routines into common lib file.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@351 36d66b0a-2a48-0410-832c-cd162a569da5
2010-10-26 22:07:43 +00:00
Milan Broz
ef44e6e3d3
Use default data alignment to 1MiB.
...
If there is topology info, use default if topology is multiple of default,
otherwise use topology values.
See https://bugzilla.redhat.com/show_bug.cgi?id=621684 and issue 55.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@325 36d66b0a-2a48-0410-832c-cd162a569da5
2010-08-09 16:34:42 +00:00
Milan Broz
0a68f45bb2
Fix device alignment ioctl calls parameters.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@251 36d66b0a-2a48-0410-832c-cd162a569da5
2010-06-01 14:39:10 +00:00
Milan Broz
205d62af89
Try to make get_key() paramater more obvious...
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@236 36d66b0a-2a48-0410-832c-cd162a569da5
2010-05-27 18:43:47 +00:00
Milan Broz
0516a1a676
Do not use kernel dm-ioctl header directly and remove warnings.
...
Add alignment test to distributed files.
Fix write() return compiler warning.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@202 36d66b0a-2a48-0410-832c-cd162a569da5
2010-04-16 15:48:09 +00:00
Milan Broz
17c87c1148
Fix minor errors
...
- undefined variable
- properly closinf file descriptorif totpology not detected
- fix IV mode to test run on RHEL5
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@201 36d66b0a-2a48-0410-832c-cd162a569da5
2010-04-16 14:51:09 +00:00
Milan Broz
743fbbc451
Support topology information for data alignment (LUKS).
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@195 36d66b0a-2a48-0410-832c-cd162a569da5
2010-04-09 15:35:19 +00:00
Milan Broz
1c91890aac
Always close file dscriptor on error.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@157 36d66b0a-2a48-0410-832c-cd162a569da5
2009-12-30 16:39:03 +00:00
Milan Broz
42f8e5bdce
Fix some strings to use gettext.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@155 36d66b0a-2a48-0410-832c-cd162a569da5
2009-12-11 11:56:32 +00:00
Milan Broz
dc4d945e88
Fix error handling during reading passhrase.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@154 36d66b0a-2a48-0410-832c-cd162a569da5
2009-12-11 11:56:25 +00:00
Milan Broz
2bda053677
Rename internal locking helpers (avoids conflict when statically linking.)
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@132 36d66b0a-2a48-0410-832c-cd162a569da5
2009-10-23 10:42:56 +00:00
Milan Broz
93796f4036
... and previous reintroduce it as debug message.
...
(The problem is when repeated passphrase input is tried on pipe,
it should not show "error reading passphrase", because it fails
for the second reading attepmt anyway but should retain
error message saying "no key with this passpharase...")
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@117 36d66b0a-2a48-0410-832c-cd162a569da5
2009-09-28 18:50:05 +00:00
Milan Broz
c096166e48
Remove error message in previous commit.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@116 36d66b0a-2a48-0410-832c-cd162a569da5
2009-09-28 18:42:26 +00:00
Milan Broz
fddd7125ca
Fail if piped input is broken.
...
(Thanks to Ludwig Nussel)
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@115 36d66b0a-2a48-0410-832c-cd162a569da5
2009-09-28 18:29:58 +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
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
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
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
Clemens Fruhwirth
fff08051b0
Segfault bugfix thanks to Oliver Metz.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@48 36d66b0a-2a48-0410-832c-cd162a569da5
2009-04-01 20:36:35 +00:00
Clemens Fruhwirth
98cf0aedf8
Thanks to Ivan Stankovic
...
* write_lseek_blockwise: declare innerCount outside the if block
* add -Wall to the default CFLAGS
* fix some signedness issues
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@29 36d66b0a-2a48-0410-832c-cd162a569da5
2008-09-01 08:54:05 +00:00
Clemens Fruhwirth
4884064723
Error handling improvement thanks to Erik Edin.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@28 36d66b0a-2a48-0410-832c-cd162a569da5
2008-08-20 10:40:45 +00:00
Clemens Fruhwirth
7dc7b90a9b
Initial checking of what was revision 56 on http://luks.endorphin.org/svn/cryptsetup
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@3 36d66b0a-2a48-0410-832c-cd162a569da5
2008-03-22 08:23:35 +00:00