Re: [PATCH] ecryptfs: pass matching flags to interpose as defined and used there

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun Dec 06, 2009 at 06:51:15PM -0500, Erez Zadok (ezk@xxxxxxxxxxxxx) 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@xxxxxxxxxxxxx>

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);
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux