Control: tags -1 patch

Looks like the "swap=plain" assumption is at src/cryptsetup/cryptsetup.c:162; here's a patch (untested as yet, will try it in the morning if I don't hear anything).

--- cryptsetup.c        2014-10-16 22:10:00.369584521 +0100
+++ cryptsetup2.c       2014-10-16 22:13:32.765582134 +0100
@@ -159,7 +159,7 @@ static int parse_one_option(const char *
         } else if (streq(option, "tcrypt-system")) {
                 arg_type = CRYPT_TCRYPT;
                 arg_tcrypt_system = true;
-        } else if (STR_IN_SET(option, "plain", "swap", "tmp"))
+ } else if (streq(option, "plain") || (arg_type == NULL && STR_IN_SET(option, "swap", "tmp")))
                 arg_type = CRYPT_PLAIN;
         else if (startswith(option, "timeout=")) {


--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to