zkey: Add common passphrase options for crypttab command

When generating crypttab entries for LUKS2 volumes, allow to
specify common passphrase options like --key-file, --keyfile-offset,
--keyfile-size and --tries and pass those to the generated crypttab
entries.

Note that not all distributions support the keyfile-offset and
keyfile-size options in crypttab entries.

Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Ingo Franzki
2019-03-14 15:59:16 +01:00
committed by Jan Höppner
parent 5a0c93443c
commit 3ed8ab4e2a
4 changed files with 140 additions and 5 deletions
+2 -1
View File
@@ -73,7 +73,8 @@ int keystore_cryptsetup(struct keystore *keystore, const char *volume_filter,
size_t keyfile_size, size_t tries, bool batch_mode);
int keystore_crypttab(struct keystore *keystore, const char *volume_filter,
const char *volume_type);
const char *volume_type, const char *keyfile,
size_t keyfile_offset, size_t keyfile_size, size_t tries);
void keystore_free(struct keystore *keystore);