Return EPERM instead EINVAL for too long TCRYPT passphrase.

This commit is contained in:
Milan Broz
2013-02-15 09:52:22 +01:00
parent e600024908
commit c810b0514e

View 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 */