platform/upstream/cryptsetup.git
14 years agoFix typos (Thanks to Solveig).
Milan Broz [Sat, 28 Nov 2009 14:43:07 +0000 (14:43 +0000)]
Fix typos (Thanks to Solveig).

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@148 36d66b0a-2a48-0410-832c-cd162a569da5

14 years agoVersion 1.1.0-rc3.
Milan Broz [Mon, 16 Nov 2009 22:41:42 +0000 (22:41 +0000)]
Version 1.1.0-rc3.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@147 36d66b0a-2a48-0410-832c-cd162a569da5

14 years agoAdd nls.h to Makefile.
Milan Broz [Mon, 16 Nov 2009 20:15:44 +0000 (20:15 +0000)]
Add nls.h to Makefile.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@146 36d66b0a-2a48-0410-832c-cd162a569da5

14 years agoUse proper NLS macros and detection (so the message translation works again).
Milan Broz [Mon, 16 Nov 2009 20:10:20 +0000 (20:10 +0000)]
Use proper NLS macros and detection (so the message translation works again).

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@145 36d66b0a-2a48-0410-832c-cd162a569da5

14 years agoAdd obsolete message for non-exclusive switch.
Milan Broz [Mon, 16 Nov 2009 19:05:40 +0000 (19:05 +0000)]
Add obsolete message for non-exclusive switch.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@144 36d66b0a-2a48-0410-832c-cd162a569da5

14 years agoUpdate list of translated files.
Milan Broz [Mon, 16 Nov 2009 18:27:19 +0000 (18:27 +0000)]
Update list of translated files.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@143 36d66b0a-2a48-0410-832c-cd162a569da5

14 years agoSimplify build system, use autopoint and clean gettext processing.
Milan Broz [Mon, 16 Nov 2009 18:20:11 +0000 (18:20 +0000)]
Simplify build system, use autopoint and clean gettext processing.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@142 36d66b0a-2a48-0410-832c-cd162a569da5

14 years agoAdd temporary debug code to allow better debugging of races
Milan Broz [Sun, 15 Nov 2009 19:26:36 +0000 (19:26 +0000)]
Add temporary debug code to allow better debugging of races
with various udev-event tools which wrongly scan and open
internal temporary cryptsetup devices.

If cryptsetup run in debug mode (--debug) and remove of device
fails, code scan /proc directory and tries to find process name
which locked that device.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@141 36d66b0a-2a48-0410-832c-cd162a569da5

14 years agoCheck in configure if selinux libraries are required in static version.
Milan Broz [Sun, 15 Nov 2009 09:27:32 +0000 (09:27 +0000)]
Check in configure if selinux libraries are required in static version.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@140 36d66b0a-2a48-0410-832c-cd162a569da5

14 years agoFix status device call to fail if running as non-root.
Milan Broz [Sat, 14 Nov 2009 21:33:57 +0000 (21:33 +0000)]
Fix status device call to fail if running as non-root.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@139 36d66b0a-2a48-0410-832c-cd162a569da5

14 years agoAdd warning about keyboard setting and add copyright into man page.
Milan Broz [Sat, 14 Nov 2009 21:33:44 +0000 (21:33 +0000)]
Add warning about keyboard setting and add copyright into man page.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@138 36d66b0a-2a48-0410-832c-cd162a569da5

14 years agoAlways print warning when device is not LUKS in crypt_load().
Milan Broz [Sat, 14 Nov 2009 21:33:30 +0000 (21:33 +0000)]
Always print warning when device is not LUKS in crypt_load().

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@137 36d66b0a-2a48-0410-832c-cd162a569da5

14 years agoAdd CRYPT_ prefix to enum defined in libcryptsetup.h.
Milan Broz [Sat, 14 Nov 2009 21:33:16 +0000 (21:33 +0000)]
Add CRYPT_ prefix to enum defined in libcryptsetup.h.

(Avoid collision with other defines.)

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@136 36d66b0a-2a48-0410-832c-cd162a569da5

15 years agoFix uninteded change in keysize.
Milan Broz [Fri, 23 Oct 2009 16:24:50 +0000 (16:24 +0000)]
Fix uninteded change in keysize.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@135 36d66b0a-2a48-0410-832c-cd162a569da5

15 years agoAllow initialisation without specifying device.
Milan Broz [Fri, 23 Oct 2009 10:43:11 +0000 (10:43 +0000)]
Allow initialisation without specifying device.

This is used e.g. when caller need only generate volume key in plain mode.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@134 36d66b0a-2a48-0410-832c-cd162a569da5

15 years agoAllow manipulate with device with only header on it (no data).
Milan Broz [Fri, 23 Oct 2009 10:43:03 +0000 (10:43 +0000)]
Allow manipulate with device with only header on it (no data).

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@133 36d66b0a-2a48-0410-832c-cd162a569da5

15 years agoRename internal locking helpers (avoids conflict when statically linking.)
Milan Broz [Fri, 23 Oct 2009 10:42:56 +0000 (10:42 +0000)]
Rename internal locking helpers (avoids conflict when statically linking.)

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@132 36d66b0a-2a48-0410-832c-cd162a569da5

15 years agoFix hyphen escape (Thanks to Jonas Meurer)
Milan Broz [Thu, 1 Oct 2009 19:03:53 +0000 (19:03 +0000)]
Fix hyphen escape (Thanks to Jonas Meurer)

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@131 36d66b0a-2a48-0410-832c-cd162a569da5

15 years agoYet another libcryptsetup.sym fix (fix make distcheck).
Milan Broz [Thu, 1 Oct 2009 15:21:48 +0000 (15:21 +0000)]
Yet another libcryptsetup.sym fix (fix make distcheck).

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@130 36d66b0a-2a48-0410-832c-cd162a569da5

15 years agoVersion 1.1.0-rc2.
Milan Broz [Thu, 1 Oct 2009 15:05:07 +0000 (15:05 +0000)]
Version 1.1.0-rc2.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@129 36d66b0a-2a48-0410-832c-cd162a569da5

15 years agoFix typo.
Milan Broz [Thu, 1 Oct 2009 14:36:59 +0000 (14:36 +0000)]
Fix typo.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@128 36d66b0a-2a48-0410-832c-cd162a569da5

15 years agoAdd some password and used algorithms notes to man page. (Thanks to Jonas Meurer)
Milan Broz [Thu, 1 Oct 2009 14:31:44 +0000 (14:31 +0000)]
Add some password and used algorithms notes to man page. (Thanks to Jonas Meurer)

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@127 36d66b0a-2a48-0410-832c-cd162a569da5

15 years agoMove duplicated failed message to verbose level, add some debug messages, fix resize...
Milan Broz [Thu, 1 Oct 2009 14:11:55 +0000 (14:11 +0000)]
Move duplicated failed message to verbose level, add some debug messages, fix resize call.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@126 36d66b0a-2a48-0410-832c-cd162a569da5

15 years agoMove dm backend initialisation to library calls.
Milan Broz [Thu, 1 Oct 2009 10:14:32 +0000 (10:14 +0000)]
Move dm backend initialisation to library calls.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@125 36d66b0a-2a48-0410-832c-cd162a569da5

15 years agoProperly apply versioned symbols in library and fix problems uncovered
Milan Broz [Wed, 30 Sep 2009 15:07:41 +0000 (15:07 +0000)]
Properly apply versioned symbols in library and fix problems uncovered
by doing that:-)

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@124 36d66b0a-2a48-0410-832c-cd162a569da5

15 years agoExport header backup and restore functions.
Milan Broz [Tue, 29 Sep 2009 12:31:49 +0000 (12:31 +0000)]
Export header backup and restore functions.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@120 36d66b0a-2a48-0410-832c-cd162a569da5

15 years agoVersion 1.1.0-rc1
Milan Broz [Tue, 29 Sep 2009 12:28:54 +0000 (12:28 +0000)]
Version 1.1.0-rc1

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@119 36d66b0a-2a48-0410-832c-cd162a569da5

15 years agoFix typo in backup file option. (Thanks to Jonas Meurer)
Milan Broz [Tue, 29 Sep 2009 11:08:29 +0000 (11:08 +0000)]
Fix typo in backup file option. (Thanks to Jonas Meurer)

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@118 36d66b0a-2a48-0410-832c-cd162a569da5

15 years ago... and previous reintroduce it as debug message.
Milan Broz [Mon, 28 Sep 2009 18:50:05 +0000 (18:50 +0000)]
... 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

15 years agoRemove error message in previous commit.
Milan Broz [Mon, 28 Sep 2009 18:42:26 +0000 (18:42 +0000)]
Remove error message in previous commit.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@116 36d66b0a-2a48-0410-832c-cd162a569da5

15 years agoFail if piped input is broken.
Milan Broz [Mon, 28 Sep 2009 18:29:58 +0000 (18:29 +0000)]
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

15 years agoAdd luksHeaderBackup and luksHeaderRestore commands and API cals.
Milan Broz [Mon, 28 Sep 2009 17:45:38 +0000 (17:45 +0000)]
Add luksHeaderBackup and luksHeaderRestore commands and API cals.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@114 36d66b0a-2a48-0410-832c-cd162a569da5

15 years agoReplace locked device with error target after 1 sec of waiting.
Milan Broz [Sun, 20 Sep 2009 18:02:41 +0000 (18:02 +0000)]
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

15 years agoFix manpage to not require --size which expands to device size by default. (Thanks...
Milan Broz [Tue, 15 Sep 2009 15:10:34 +0000 (15:10 +0000)]
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

15 years agoInitialize crypto library before LUKS header load.
Milan Broz [Tue, 15 Sep 2009 15:10:23 +0000 (15:10 +0000)]
Initialize crypto library before LUKS header load.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@111 36d66b0a-2a48-0410-832c-cd162a569da5

15 years agoFix typo in help text.
Milan Broz [Fri, 11 Sep 2009 10:17:54 +0000 (10:17 +0000)]
Fix typo in help text.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@110 36d66b0a-2a48-0410-832c-cd162a569da5

15 years agopatch 1.patch
Milan Broz [Thu, 10 Sep 2009 12:41:18 +0000 (12:41 +0000)]
patch 1.patch

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@109 36d66b0a-2a48-0410-832c-cd162a569da5

15 years agoUse selinux libs only when needed (fixes previous commit).
Milan Broz [Tue, 8 Sep 2009 13:08:36 +0000 (13:08 +0000)]
Use selinux libs only when needed (fixes previous commit).

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@108 36d66b0a-2a48-0410-832c-cd162a569da5

15 years agoAdd dirty hack to properly compile static binary with selinux and libgcrypt.
Milan Broz [Tue, 8 Sep 2009 12:53:00 +0000 (12:53 +0000)]
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

15 years agoTry to read first sector from device to properly check that device is ready.
Milan Broz [Tue, 8 Sep 2009 10:29:50 +0000 (10:29 +0000)]
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

15 years agoUse dm-uuid for all crypt devices, contains device type and name now.
Milan Broz [Tue, 8 Sep 2009 06:41:44 +0000 (06:41 +0000)]
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

15 years ago* Add luksSuspend (freeze device and wipe key) and luksResume (with provided passphrase).
Milan Broz [Wed, 2 Sep 2009 12:47:21 +0000 (12:47 +0000)]
* 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

15 years agoDisable --non-exclusive test.
Milan Broz [Mon, 31 Aug 2009 17:15:07 +0000 (17:15 +0000)]
Disable --non-exclusive test.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@103 36d66b0a-2a48-0410-832c-cd162a569da5

15 years agoAdd LUKS open and format test using new api.
Milan Broz [Mon, 31 Aug 2009 17:03:22 +0000 (17:03 +0000)]
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

15 years ago* Replace not safe option --non-exclusive with --disable-uuid.
Milan Broz [Mon, 31 Aug 2009 17:03:10 +0000 (17:03 +0000)]
* 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

15 years agoAdd plain crypt device test using new API.
Milan Broz [Mon, 31 Aug 2009 10:36:36 +0000 (10:36 +0000)]
Add plain crypt device test using new API.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@100 36d66b0a-2a48-0410-832c-cd162a569da5

15 years ago* Add --master-key-file option for luksFormat and luksAddKey.
Milan Broz [Sun, 30 Aug 2009 18:10:23 +0000 (18:10 +0000)]
* 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

15 years ago* Remove old API code helper functions.
Milan Broz [Sun, 30 Aug 2009 18:10:11 +0000 (18:10 +0000)]
* 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

15 years ago* Implement old API calls using new functions.
Milan Broz [Sun, 30 Aug 2009 18:10:02 +0000 (18:10 +0000)]
* 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

15 years ago* Add new libcryptsetup API (documented in libcryptsetup.h).
Milan Broz [Sun, 30 Aug 2009 18:09:53 +0000 (18:09 +0000)]
* 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

15 years ago* Replace global options struct with separate parameters in helper functions.
Milan Broz [Sun, 30 Aug 2009 18:09:43 +0000 (18:09 +0000)]
* 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

15 years ago* Run performance check for PBKDF2 from LUKS code, do not mix hash algoritms results.
Milan Broz [Sun, 30 Aug 2009 18:09:34 +0000 (18:09 +0000)]
* 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

15 years ago* Move device utils code and provide context parameter (for log).
Milan Broz [Sun, 30 Aug 2009 18:09:21 +0000 (18:09 +0000)]
* 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

15 years ago* Add log macros and make logging modre consitent.
Milan Broz [Sun, 30 Aug 2009 18:07:17 +0000 (18:07 +0000)]
* 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

15 years ago* Move memory locking and dm initialization to command layer.
Milan Broz [Sun, 30 Aug 2009 18:07:00 +0000 (18:07 +0000)]
* 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

15 years agoRequire device device-mapper to build and do not use backend wrapper for dm calls.
Milan Broz [Sun, 30 Aug 2009 17:56:33 +0000 (17:56 +0000)]
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

15 years agoTest commit.
Milan Broz [Sun, 30 Aug 2009 17:49:37 +0000 (17:49 +0000)]
Test commit.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@89 36d66b0a-2a48-0410-832c-cd162a569da5

15 years agoFix include path.
Milan Broz [Fri, 28 Aug 2009 15:54:03 +0000 (15:54 +0000)]
Fix include path.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@88 36d66b0a-2a48-0410-832c-cd162a569da5

15 years agoAdd separate tests directory, move LUKS tests, Add old library API tests.
Milan Broz [Fri, 28 Aug 2009 15:22:37 +0000 (15:22 +0000)]
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

15 years agoAllow restrict keys size in LuksOpen (thanks to Stefan Assmann)
Milan Broz [Mon, 17 Aug 2009 11:04:36 +0000 (11:04 +0000)]
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

15 years agoAllow using passphrase provided in options struct for LuksOpen (thanks to Waldemar...
Milan Broz [Mon, 17 Aug 2009 11:03:29 +0000 (11:03 +0000)]
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

15 years agoFix PBKDF2 speed calculation for large passhrases.
Milan Broz [Mon, 17 Aug 2009 06:28:22 +0000 (06:28 +0000)]
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

15 years agoEnable LUKS hash setting and document it.
Milan Broz [Thu, 30 Jul 2009 15:02:53 +0000 (15:02 +0000)]
Enable LUKS hash setting and document it.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@83 36d66b0a-2a48-0410-832c-cd162a569da5

15 years agoRemove internal SHA1 implementation, not needed now.
Milan Broz [Thu, 30 Jul 2009 15:01:22 +0000 (15:01 +0000)]
Remove internal SHA1 implementation, not needed now.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@82 36d66b0a-2a48-0410-832c-cd162a569da5

15 years agoMove XOR function to af.c, nobody outside of it use it now.
Milan Broz [Thu, 30 Jul 2009 14:59:10 +0000 (14:59 +0000)]
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

15 years agoAdd required parameters for changing hash used in LUKS key setup scheme.
Milan Broz [Thu, 30 Jul 2009 14:57:52 +0000 (14:57 +0000)]
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

15 years agoSwitch PBKDF2 from internal SHA1 to libgcrypt.
Milan Broz [Thu, 30 Jul 2009 14:56:59 +0000 (14:56 +0000)]
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

15 years agoReturn ENOENT for empty keyslots, EINVAL will be used later for other type of errors.
Milan Broz [Thu, 30 Jul 2009 14:55:24 +0000 (14:55 +0000)]
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

15 years agoRemove po/cryptsetup-luks.pot, it's autogenerated (thanks to Ivan Stankovic)
Milan Broz [Thu, 30 Jul 2009 14:48:08 +0000 (14:48 +0000)]
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

15 years agoPrint error when getline() fails (thanks to Ivan Stankovic)
Milan Broz [Thu, 30 Jul 2009 14:46:56 +0000 (14:46 +0000)]
Print error when getline() fails (thanks to Ivan Stankovic)

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@76 36d66b0a-2a48-0410-832c-cd162a569da5

15 years agoFix DEBUG output (thanks to Ivan Stankovic)
Milan Broz [Thu, 30 Jul 2009 14:46:20 +0000 (14:46 +0000)]
Fix DEBUG output (thanks to Ivan Stankovic)

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@75 36d66b0a-2a48-0410-832c-cd162a569da5

15 years agoOptimize o_direct read/writes.
Milan Broz [Tue, 28 Jul 2009 09:29:13 +0000 (09:29 +0000)]
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

15 years agoFix segfault if provided slot in luksKillslot is invalid.
Milan Broz [Thu, 23 Jul 2009 11:04:46 +0000 (11:04 +0000)]
Fix segfault if provided slot in luksKillslot is invalid.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@73 36d66b0a-2a48-0410-832c-cd162a569da5

15 years agoRemove unneeded timeout when remove of temporary device succeeded.
Milan Broz [Wed, 22 Jul 2009 20:21:49 +0000 (20:21 +0000)]
Remove unneeded timeout when remove of temporary device succeeded.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@72 36d66b0a-2a48-0410-832c-cd162a569da5

15 years agoCryptsetup version 1.0.7.
Milan Broz [Wed, 22 Jul 2009 10:43:40 +0000 (10:43 +0000)]
Cryptsetup version 1.0.7.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@66 36d66b0a-2a48-0410-832c-cd162a569da5

15 years agoAllow removal of last slot in luksRemoveKey and luksKillSlot.
Milan Broz [Thu, 16 Jul 2009 12:59:00 +0000 (12:59 +0000)]
Allow removal of last slot in luksRemoveKey and luksKillSlot.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@65 36d66b0a-2a48-0410-832c-cd162a569da5

15 years agoAdd --disable-selinux option and fix static build if selinux is required.
Milan Broz [Sun, 12 Jul 2009 21:37:03 +0000 (21:37 +0000)]
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

15 years agoReject unsupported --offset and --skip options for luksFormat and update man page.
Milan Broz [Sat, 11 Jul 2009 07:09:05 +0000 (07:09 +0000)]
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

15 years agocryptsetup 1.0.7-rc1
Milan Broz [Mon, 22 Jun 2009 14:13:40 +0000 (14:13 +0000)]
cryptsetup 1.0.7-rc1

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@60 36d66b0a-2a48-0410-832c-cd162a569da5

15 years agoAdd some checks for error codes.
Milan Broz [Mon, 22 Jun 2009 12:40:31 +0000 (12:40 +0000)]
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

15 years agoFix device prompt quistion.
Milan Broz [Mon, 22 Jun 2009 12:38:08 +0000 (12:38 +0000)]
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

15 years agoDefine device-mapper crypt UUID maximal length and check for its size.
Milan Broz [Sun, 21 Jun 2009 10:02:10 +0000 (10:02 +0000)]
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

15 years agoVarious man page fixes.
Milan Broz [Sat, 20 Jun 2009 21:15:04 +0000 (21:15 +0000)]
Various man page fixes.

(also merged some Debian/Ubuntu man page fixes, thanks to Martin Pitt)

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@56 36d66b0a-2a48-0410-832c-cd162a569da5

15 years agoSet UUID in device-mapper for LUKS devices.
Milan Broz [Sat, 20 Jun 2009 20:24:56 +0000 (20:24 +0000)]
Set UUID in device-mapper for LUKS devices.

Device mapper device should use UUID string if possible.
UDEV can then easily distinguish the device type etc.

cryptsetup now uses CRYPT prefix for uuid.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@55 36d66b0a-2a48-0410-832c-cd162a569da5

15 years agoRetain readahead of underlying device.
Milan Broz [Sat, 20 Jun 2009 20:22:27 +0000 (20:22 +0000)]
Retain readahead of underlying device.
(If libdevmapper version supports it).

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@54 36d66b0a-2a48-0410-832c-cd162a569da5

15 years agoDisplay device name when asking for password.
Milan Broz [Sat, 20 Jun 2009 20:20:41 +0000 (20:20 +0000)]
Display device name when asking for password.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@53 36d66b0a-2a48-0410-832c-cd162a569da5

15 years agoCheck device size when loading LUKS header.
Milan Broz [Sat, 20 Jun 2009 09:24:33 +0000 (09:24 +0000)]
Check device size when loading LUKS header.
(And remove misleading error message later.)

Because kernel and libdevmapper does not provide
better error message then "invalid parameters"
add some error hint if dm-crypt mapping failed.
(Key size and kernel version check for XTS and LRW mode
for now.)

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@52 36d66b0a-2a48-0410-832c-cd162a569da5

15 years agoUse better error messages if device doesn't exist
Milan Broz [Fri, 19 Jun 2009 17:03:22 +0000 (17:03 +0000)]
Use better error messages if device doesn't exist
or is already used by other mapping.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@51 36d66b0a-2a48-0410-832c-cd162a569da5

15 years agoFix make distcheck (Mike Kelly)
Milan Broz [Fri, 19 Jun 2009 15:53:45 +0000 (15:53 +0000)]
Fix make distcheck (Mike Kelly)

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@50 36d66b0a-2a48-0410-832c-cd162a569da5

15 years agoShould fix Issue 5.
Clemens Fruhwirth [Sun, 5 Apr 2009 17:21:03 +0000 (17:21 +0000)]
Should fix Issue 5.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@49 36d66b0a-2a48-0410-832c-cd162a569da5

15 years agoSegfault bugfix thanks to Oliver Metz.
Clemens Fruhwirth [Wed, 1 Apr 2009 20:36:35 +0000 (20:36 +0000)]
Segfault bugfix thanks to Oliver Metz.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@48 36d66b0a-2a48-0410-832c-cd162a569da5

15 years agoRemove precompiled pot files.
Clemens Fruhwirth [Fri, 16 Jan 2009 17:06:31 +0000 (17:06 +0000)]
Remove precompiled pot files.
Fix uninitialized return value variable in setup.c.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@47 36d66b0a-2a48-0410-832c-cd162a569da5

15 years agoCleanups thanks to Ivan Stankovic
Clemens Fruhwirth [Tue, 13 Jan 2009 20:09:17 +0000 (20:09 +0000)]
Cleanups thanks to Ivan Stankovic

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@46 36d66b0a-2a48-0410-832c-cd162a569da5

15 years agoRemove unnecessary files from po/. They will be regenerated by ./autogen.sh
Clemens Fruhwirth [Tue, 13 Jan 2009 19:48:25 +0000 (19:48 +0000)]
Remove unnecessary files from po/. They will be regenerated by ./autogen.sh

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@45 36d66b0a-2a48-0410-832c-cd162a569da5

15 years ago* Fix wrong output for remaining key at key deletion.
Clemens Fruhwirth [Fri, 19 Dec 2008 19:39:42 +0000 (19:39 +0000)]
* Fix wrong output for remaining key at key deletion.
* Allow deletion of key slot while other keys have the same key
  information (that implied rewritting verification logic).

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@41 36d66b0a-2a48-0410-832c-cd162a569da5

16 years agoAdd missing AM_PROG_CC_C_O to configure.in
Milan Broz [Wed, 5 Nov 2008 15:05:15 +0000 (15:05 +0000)]
Add missing AM_PROG_CC_C_O to configure.in

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@40 36d66b0a-2a48-0410-832c-cd162a569da5

16 years agoRemove duplicate sentence in man page (patch by Till Maas).
Milan Broz [Wed, 5 Nov 2008 11:30:21 +0000 (11:30 +0000)]
Remove duplicate sentence in man page (patch by Till Maas).

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@39 36d66b0a-2a48-0410-832c-cd162a569da5

16 years agoWipe start of device before LUKS-formatting.
Milan Broz [Wed, 5 Nov 2008 11:23:24 +0000 (11:23 +0000)]
Wipe start of device before LUKS-formatting.

Cryptsetup keeps some sectors (between the physical LUKS header
and keyslot data) on disk untouched, unfortunatelly ext2/3/4 signature can
be there and blkid detects filesystem here instead of LUKS.

This patch wipes the first eight sectors on disk with zero during luksFormat.
This should be probably solved by physical header padding in next version.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@38 36d66b0a-2a48-0410-832c-cd162a569da5

16 years agoDo not process configure.in in hidden directories.
Milan Broz [Wed, 5 Nov 2008 11:21:53 +0000 (11:21 +0000)]
Do not process configure.in in hidden directories.

(E.g. quilt uses ".pc" dir for file backups to track
changes and processing this directory by autogen is incorrect.)

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@37 36d66b0a-2a48-0410-832c-cd162a569da5

16 years agoRemove more autoconf stuff as it is generated by autogen.sh anyway.
Clemens Fruhwirth [Thu, 23 Oct 2008 19:08:40 +0000 (19:08 +0000)]
Remove more autoconf stuff as it is generated by autogen.sh anyway.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@36 36d66b0a-2a48-0410-832c-cd162a569da5