Return EPERM instead EINVAL for too long TCRYPT passphrase.
authorMilan Broz <gmazyland@gmail.com>
Fri, 15 Feb 2013 08:52:22 +0000 (09:52 +0100)
committerMilan Broz <gmazyland@gmail.com>
Fri, 15 Feb 2013 08:52:22 +0000 (09:52 +0100)
lib/tcrypt/tcrypt.c

index 6c0f782..975f916 100644 (file)
@@ -488,7 +488,7 @@ static int TCRYPT_init_hdr(struct crypt_device *cd,
        if (params->passphrase_size > TCRYPT_KEY_POOL_LEN) {
                log_err(cd, _("Maximum TCRYPT passphrase length (%d) exceeded.\n"),
                              TCRYPT_KEY_POOL_LEN);
-               return -EINVAL;
+               return -EPERM;
        }
 
        /* Calculate pool content from keyfiles */