From c810b0514eda52b8fb6e6d429f82f0cee0038303 Mon Sep 17 00:00:00 2001 From: Milan Broz Date: Fri, 15 Feb 2013 09:52:22 +0100 Subject: [PATCH] Return EPERM instead EINVAL for too long TCRYPT passphrase. --- lib/tcrypt/tcrypt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tcrypt/tcrypt.c b/lib/tcrypt/tcrypt.c index 6c0f782b..975f916f 100644 --- a/lib/tcrypt/tcrypt.c +++ b/lib/tcrypt/tcrypt.c @@ -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 */