Milan Broz
ce2218ed65
Support init_by_name for verity.
2012-06-08 16:38:26 +02:00
Milan Broz
c4b16923bb
Unify dm backend for crypt/verity.
2012-06-08 10:12:12 +02:00
Milan Broz
b016e65daa
Use union in dm (crypt/verity) query structure.
2012-06-08 08:58:35 +02:00
Milan Broz
0e79728f86
Detect dm-verity in kernel.
2012-06-07 12:32:06 +02:00
Milan Broz
4b0b82adc5
Rewrite veritysetup to use libcryptsetup.
2012-06-07 00:18:49 +02:00
Milan Broz
c2a33b480f
Allow empty cipher (cipher_null).
2012-05-20 21:38:23 +02:00
Milan Broz
ba7d9967a8
Allow "private" activation (skip some udev global rules) flag.
2012-05-02 16:51:58 +02:00
Milan Broz
bbc3339bda
Switch on retry on device remove for libdevmapper.
2012-05-02 14:18:04 +02:00
Milan Broz
ee8425b836
Version 1.4.2.
...
Add header and copyright for header files.
2012-04-02 22:03:05 +02:00
Milan Broz
7835b365a7
Fix FSF address in license text according to
...
http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@671 36d66b0a-2a48-0410-832c-cd162a569da5
2011-11-02 22:35:21 +00:00
Milan Broz
d7960b9307
Simplify global error call.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@622 36d66b0a-2a48-0410-832c-cd162a569da5
2011-10-09 13:45:38 +00:00
Milan Broz
4a295781d1
Silent gcc warnings with -Wconst-qual switch.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@598 36d66b0a-2a48-0410-832c-cd162a569da5
2011-08-15 16:32:52 +00:00
Milan Broz
1bf26b9a90
* Revert default initialisation of volume key in crypt_init_by_name().
...
* Do not allow key retrieval while suspended (key could be wiped).
* Do not allow suspend for non-LUKS devices.
* Support retries and timeout parameters for luksSuspend.
Add luksSuspend/Resume test.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@574 36d66b0a-2a48-0410-832c-cd162a569da5
2011-07-19 13:55:34 +00:00
Milan Broz
9c71c74d59
Add --enable-discards option to allow discards/TRIM requests.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@572 36d66b0a-2a48-0410-832c-cd162a569da5
2011-07-17 22:35:40 +00:00
Milan Broz
39e6cfcb8a
Use struct volume key thorough.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@571 36d66b0a-2a48-0410-832c-cd162a569da5
2011-07-17 22:35:30 +00:00
Milan Broz
913ef7c07e
Rewrite dm query/create function backend.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@570 36d66b0a-2a48-0410-832c-cd162a569da5
2011-07-17 22:35:17 +00:00
Milan Broz
d44d07c9eb
* Add --shared option for creating non-overlapping crypt segments.
...
* Add shared flag to libcryptsetup api.
* Fix plain crypt format parameters to include size option (API change).
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@559 36d66b0a-2a48-0410-832c-cd162a569da5
2011-07-01 16:38:58 +00:00
Milan Broz
b2569b6d5c
Handle even non-standard and non-udev /dev in devpath.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@531 36d66b0a-2a48-0410-832c-cd162a569da5
2011-05-24 11:19:21 +00:00
Milan Broz
2755f37266
Move devpath scan to separate file.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@529 36d66b0a-2a48-0410-832c-cd162a569da5
2011-05-24 11:19:00 +00:00
Milan Broz
62309b345a
Simplify device path scan and avoid stat();
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@526 36d66b0a-2a48-0410-832c-cd162a569da5
2011-05-18 17:25:21 +00:00
Milan Broz
9ca1ac5a39
Remove another compile warnings.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@515 36d66b0a-2a48-0410-832c-cd162a569da5
2011-04-18 14:03:59 +00:00
Milan Broz
5d2205a2f8
Fix verbose mode compiler warnings.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@510 36d66b0a-2a48-0410-832c-cd162a569da5
2011-04-18 10:52:02 +00:00
Milan Broz
c31854e2b3
Check for plain64 IV support in DM backend.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@477 36d66b0a-2a48-0410-832c-cd162a569da5
2011-03-22 08:51:00 +00:00
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
0e8d61035b
Workaround LMK capability check if dm-crypt module not yet loaded.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@436 36d66b0a-2a48-0410-832c-cd162a569da5
2011-03-10 17:15:55 +00:00
Milan Broz
0165301357
Better detects dm-ioctl secure flag using version before use.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@435 36d66b0a-2a48-0410-832c-cd162a569da5
2011-03-05 21:59:21 +00:00
Milan Broz
0b5418c02f
Use secure data bit for dm-ioctl if supported.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@434 36d66b0a-2a48-0410-832c-cd162a569da5
2011-03-05 20:47:21 +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
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
b117dcc209
Do not query non-existent device twice:
...
# cryptsetup status /dev/nonexistent
Device /dev/nonexistent not found
Device /dev/nonexistent not found
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@330 36d66b0a-2a48-0410-832c-cd162a569da5
2010-08-13 14:05:34 +00:00
Milan Broz
a707ec6200
Fix previous commit to properly check udev flag definition.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@297 36d66b0a-2a48-0410-832c-cd162a569da5
2010-07-03 13:18:05 +00:00
Milan Broz
64072e0e20
Fix udev support for old libdevmapper with not compatible definition.
...
Some released devmapper libraries have defined dm_task_set_cookie()
with not compatible parameters (ABI break), let's check for udev support
by using flags definition (udev is for cryptsetup not usable without this anyway).
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@296 36d66b0a-2a48-0410-832c-cd162a569da5
2010-07-03 13:11:32 +00:00
Milan Broz
49463051bc
Remove device even if underlying device disappeared.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@240 36d66b0a-2a48-0410-832c-cd162a569da5
2010-05-30 12:20:56 +00:00
Milan Broz
cddf4d859d
Fix luksClose if underlying device is another DM device
...
and commands fails with "Device 253:0 doesn't exist or access denied." error.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@225 36d66b0a-2a48-0410-832c-cd162a569da5
2010-05-23 13:09:33 +00:00
Milan Broz
b237358079
Fix automatic dm-crypt module loading.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@222 36d66b0a-2a48-0410-832c-cd162a569da5
2010-05-03 15:02:47 +00:00
Milan Broz
1dcd5a3de5
Detect old dm-crypt module and disable LUKS suspend/resume.
...
Fix apitest to work on older systems.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@205 36d66b0a-2a48-0410-832c-cd162a569da5
2010-04-30 12:03:41 +00:00
Milan Broz
346e1d1264
Fix includes for libdevmapper internals.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@204 36d66b0a-2a48-0410-832c-cd162a569da5
2010-04-29 22:26:14 +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
4f14b43a3d
Fix udev support. Set flag to disable udev rules for temporary devices.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@199 36d66b0a-2a48-0410-832c-cd162a569da5
2010-04-16 11:11:37 +00:00
Milan Broz
4a42f27d78
Detect and use devmapper udev support if available (disable by --disable-udev).
...
If we have device-mapper, get ingo using dm_udev_get_sync_support(),
otherwise ignore udev completely.
You can disable udev support by adding --disable-udev to configure, default is enabled.
(There can be races if udev rules run some actions and cryptsetup doesn't wait it.)
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@198 36d66b0a-2a48-0410-832c-cd162a569da5
2010-04-15 15:32:42 +00:00
Milan Broz
7d207b7725
Prefer some device paths in status display. (Issue 48)
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@194 36d66b0a-2a48-0410-832c-cd162a569da5
2010-04-06 15:06:36 +00:00
Milan Broz
37d693cfc2
Fix missing includes on recent systems.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@178 36d66b0a-2a48-0410-832c-cd162a569da5
2010-01-15 11:11:37 +00:00
Milan Broz
c3064c9442
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
2009-11-15 19:26:36 +00:00
Milan Broz
e618f38929
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
2009-11-14 21:33:57 +00:00
Milan Broz
de95a38381
Move dm backend initialisation to library calls.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@125 36d66b0a-2a48-0410-832c-cd162a569da5
2009-10-01 10:14:32 +00:00
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
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
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
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