linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
To: Erez Zadok <ezk@cs.sunysb.edu>
Cc: Dustin Kirkland <kirkland@canonical.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] ecryptfs: pass matching flags to interpose as defined and used there
Date: Mon, 7 Dec 2009 16:40:14 -0600	[thread overview]
Message-ID: <20091207224014.GA10148@fedora-virt> (raw)
In-Reply-To: <200912062351.nB6NpFZF030262@agora.fsl.cs.sunysb.edu>

On Sun Dec 06, 2009 at 06:51:15PM -0500, Erez Zadok (ezk@cs.sunysb.edu) was quoted:
> 
> ecryptfs: pass matching flags to interpose as defined and used there
> 
> ecryptfs_interpose checks if one of the flags passed is
> ECRYPTFS_INTERPOSE_FLAG_D_ADD, defined as 0x00000001 in ecryptfs_kernel.h.
> But the only user of ecryptfs_interpose to pass a non-zero flag to it, has
> hard-coded the value as "1". This could spell trouble if any of these values
> changes in the future.
> 
> Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>

Nice catch!  Thanks again!

Applied to
git://git.kernel.org/pub/scm/linux/kernel/git/ecryptfs/ecryptfs-2.6.git#next

> diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c
> index 91a5dba..dd5d1ba 100644
> --- a/fs/ecryptfs/inode.c
> +++ b/fs/ecryptfs/inode.c
> @@ -282,7 +282,8 @@ int ecryptfs_lookup_and_interpose_lower(struct dentry *ecryptfs_dentry,
>  		goto out;
>  	}
>  	rc = ecryptfs_interpose(lower_dentry, ecryptfs_dentry,
> -				ecryptfs_dir_inode->i_sb, 1);
> +				ecryptfs_dir_inode->i_sb,
> +				ECRYPTFS_INTERPOSE_FLAG_D_ADD);
>  	if (rc) {
>  		printk(KERN_ERR "%s: Error interposing; rc = [%d]\n",
>  		       __func__, rc);

      reply	other threads:[~2009-12-07 22:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-06 23:51 [PATCH] ecryptfs: pass matching flags to interpose as defined and used there Erez Zadok
2009-12-07 22:40 ` 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=20091207224014.GA10148@fedora-virt \
    --to=tyhicks@linux.vnet.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=ezk@cs.sunysb.edu \
    --cc=kirkland@canonical.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).