All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tyler Hicks <tyhicks@canonical.com>
To: Tim Sally <tsally@atomicpeace.com>
Cc: dustin.kirkland@gazzang.com, ecryptfs@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] eCryptfs: check for eCryptfs cipher support at mount
Date: Fri, 13 Jul 2012 17:24:49 -0700	[thread overview]
Message-ID: <20120714002448.GB24393@boyd> (raw)
In-Reply-To: <1342134624-31564-1-git-send-email-tsally@atomicpeace.com>

[-- Attachment #1: Type: text/plain, Size: 2132 bytes --]

On 2012-07-12 19:10:24, Tim Sally wrote:
> The issue occurs when eCryptfs is mounted with a cipher supported by
> the crypto subsystem but not by eCryptfs. The mount succeeds and an
> error does not occur until a write. This change checks for eCryptfs
> cipher support at mount time.
> 
> Resolves Launchpad issue #338914, reported by Tyler Hicks in 03/2009.
> https://bugs.launchpad.net/ecryptfs/+bug/338914
> 
> Signed-off-by: Tim Sally <tsally@atomicpeace.com>

Looks good! I've pushed it to the eCryptfs -next branch and it will go
in during the 3.6 merge window.

I'm looking forward to more eCryptfs patches from you. Thanks!

Tyler

> ---
>  fs/ecryptfs/main.c |   13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c
> index df217dc..aee998d 100644
> --- a/fs/ecryptfs/main.c
> +++ b/fs/ecryptfs/main.c
> @@ -279,6 +279,7 @@ static int ecryptfs_parse_options(struct ecryptfs_sb_info *sbi, char *options,
>  	char *fnek_src;
>  	char *cipher_key_bytes_src;
>  	char *fn_cipher_key_bytes_src;
> +	u8 cipher_code;
>  
>  	*check_ruid = 0;
>  
> @@ -420,6 +421,18 @@ static int ecryptfs_parse_options(struct ecryptfs_sb_info *sbi, char *options,
>  	    && !fn_cipher_key_bytes_set)
>  		mount_crypt_stat->global_default_fn_cipher_key_bytes =
>  			mount_crypt_stat->global_default_cipher_key_size;
> +
> +	cipher_code = ecryptfs_code_for_cipher_string(
> +		mount_crypt_stat->global_default_cipher_name,
> +		mount_crypt_stat->global_default_cipher_key_size);
> +	if (!cipher_code) {
> +		ecryptfs_printk(KERN_ERR,
> +				"eCryptfs doesn't support cipher: %s.",
> +				mount_crypt_stat->global_default_cipher_name);
> +		rc = -EINVAL;
> +		goto out;
> +	}
> +
>  	mutex_lock(&key_tfm_list_mutex);
>  	if (!ecryptfs_tfm_exists(mount_crypt_stat->global_default_cipher_name,
>  				 NULL)) {
> -- 
> 1.7.10.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe ecryptfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

      reply	other threads:[~2012-07-14  0:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-11  1:05 [PATCH 0/1] Check for eCryptfs cipher support at mount time Tim Sally
2012-07-11  1:05 ` [PATCH 1/1] eCryptfs: check for eCryptfs cipher support at mount Tim Sally
2012-07-11 17:11   ` Tyler Hicks
2012-07-12 23:10     ` Tim Sally
2012-07-14  0:24       ` Tyler Hicks [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120714002448.GB24393@boyd \
    --to=tyhicks@canonical.com \
    --cc=dustin.kirkland@gazzang.com \
    --cc=ecryptfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tsally@atomicpeace.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.