Commit Graph

11 Commits

Author SHA1 Message Date
Alfred Klomp
a2160ba061 integritysetup: support mode=(journal|bitmap|direct)
Add a parameter to the integritytab file to set the mode in which to
open the integrity volume. The mode can be journaled (the default),
bitmap without a journal, or direct mode without a journal or a bitmap.

This change removes the `no-journal' option because it is redundant,
being replaced with `mode=direct'.

Supercedes commit bcc1ee56c, from a week ago, which implemented
`no-journal'.

Resolves #27587
2023-06-08 20:21:59 +01:00
Lennart Poettering
a9b837aa34 generators: change TimeoutSec=0 to TimeoutSec=infinity
With these settings we intend to turn off timeouts for possibly
interactive/slow commands. The officially documented way to turn off the
time-outs is to setting them to infinity. So far we set them to zero
here though.

This lead to some confusiong, for example #18224. Let's fix this by
uniformly spelling out TimeoutSec=infinity.

This doesn't change behaviour. It just makes our generated files match
what we document, without relying on historic compat support.

Fixes: #18224
2023-06-06 12:38:16 +01:00
Russell Harmon
bcc1ee56c0 Support no-journal for dm-integrity devices.
As documented in integritysetup.8, dm-integrity devices support running
without a journal whatsoever. This change allows the
CRYPT_ACTIVATE_NO_JOURNAL flag (the same as is used with `integritysetup
--integrity-no-journal`) to be passed in during dmsetup by specifying
the `no-journal` option in integritytab.5.
2023-05-30 16:35:46 +09:00
Luca Boccassi
872f9da4d8 integritysetup: do not use crypt_init_data_device after crypt_init
crypt_init_data_device() replaces the crypt_device struct with a
new allocation, losing the old one, which we get from crypt_init().
Use crypt_set_data_device() instead.

Enhance the test to cover this option too.
2022-08-04 00:58:57 +01:00
Lennart Poettering
e2bc5194af integritysetup: also validate volume name
Exactly like for veritysetup/cryptsetup
2022-03-31 11:44:46 +02:00
Lennart Poettering
752d859442 integritysetup: also port to mangle_none()
Let's make the tool work more like veritysetup/cryptsetup in this regard
too.
2022-03-31 11:44:46 +02:00
Lennart Poettering
2b4b030044 integritysetup: log when attempted to detach already detached volume
To make the tool behave more like cryptsetup/veritysetup
2022-03-31 11:44:46 +02:00
Lennart Poettering
042fcbbf7e integritysetup: rename action → verb, to match other code 2022-03-31 11:44:46 +02:00
Lennart Poettering
542bb9be7c tree-wide: unify some code that looks for --help in the command line 2022-03-31 11:44:46 +02:00
Tony Asleson
f4ae986649 integritysetup: Check args to prevent assert
The utility function parse_integrity_options is used to both validate
integritytab options or validate and return values.  In the case where
we are validating only and we have specific value options we will
assert.
2021-10-28 20:54:41 +09:00
Tony Asleson
1f1a2243c0 Add stand-alone dm-integrity support
This adds support for dm integrity targets and an associated
/etc/integritytab file which is required as the dm integrity device
super block doesn't include all of the required metadata to bring up
the device correctly.  See integritytab man page for details.
2021-10-15 10:19:54 -05:00