1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-23 17:34:00 +03:00

cryptsetup: catch up with debian crypttab options a bit

Support some aliases Debian added, and drop some options that Debian
dropped from our list of unsupported options.
This commit is contained in:
Lennart Poettering 2020-04-29 10:22:39 +02:00
parent 053e0626db
commit 8ced40c09b

View File

@ -67,12 +67,14 @@ STATIC_DESTRUCTOR_REGISTER(arg_pkcs11_uri, freep);
/* Options Debian's crypttab knows we don't:
precheck=
check=
checkargs=
noearly=
loud=
noearly
loud
quiet
keyscript=
tmp= (the version without argument is supported)
initramfs
*/
static int parse_one_option(const char *option) {
@ -126,7 +128,8 @@ static int parse_one_option(const char *option) {
return 0;
}
} else if ((val = startswith(option, "key-slot="))) {
} else if ((val = startswith(option, "key-slot=")) ||
(val = startswith(option, "keyslot="))) {
arg_type = ANY_LUKS;
r = safe_atoi(val, &arg_key_slot);
@ -202,13 +205,13 @@ static int parse_one_option(const char *option) {
arg_type = ANY_LUKS;
else if (streq(option, "tcrypt"))
arg_type = CRYPT_TCRYPT;
else if (streq(option, "tcrypt-hidden")) {
else if (STR_IN_SET(option, "tcrypt-hidden", "tcrypthidden")) {
arg_type = CRYPT_TCRYPT;
arg_tcrypt_hidden = true;
} else if (streq(option, "tcrypt-system")) {
arg_type = CRYPT_TCRYPT;
arg_tcrypt_system = true;
} else if (streq(option, "tcrypt-veracrypt")) {
} else if (STR_IN_SET(option, "tcrypt-veracrypt", "veracrypt")) {
arg_type = CRYPT_TCRYPT;
arg_tcrypt_veracrypt = true;
} else if (STR_IN_SET(option, "plain", "swap", "tmp"))