lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 23 Aug 2016 23:48:01 +0200
From:   Richard Weinberger <richard@....at>
To:     Miklos Szeredi <mszeredi@...hat.com>, linux-fsdevel@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org, Al Viro <viro@...iv.linux.org.uk>,
        Jan Kara <jack@...e.cz>, Theodore Ts'o <tytso@....edu>,
        Jaegeuk Kim <jaegeuk@...nel.org>,
        OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>,
        Mikulas Patocka <mpatocka@...hat.com>,
        David Woodhouse <dwmw2@...radead.org>,
        Dave Kleikamp <shaggy@...nel.org>,
        Ryusuke Konishi <konishi.ryusuke@....ntt.co.jp>,
        Bob Copeland <me@...copeland.com>,
        Christoph Hellwig <hch@...radead.org>
Subject: Re: [PATCH 2/7] fs: support RENAME_NOREPLACE for local filesystems

Miklos,

On 23.08.2016 16:05, Miklos Szeredi wrote:
> diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c
> index 4b86d3a738e1..23d1ebabc688 100644
> --- a/fs/ubifs/dir.c
> +++ b/fs/ubifs/dir.c
> @@ -966,7 +966,8 @@ static void unlock_3_inodes(struct inode *inode1, struct inode *inode2,
>  }
>  
>  static int ubifs_rename(struct inode *old_dir, struct dentry *old_dentry,
> -			struct inode *new_dir, struct dentry *new_dentry)
> +			struct inode *new_dir, struct dentry *new_dentry,
> +			unsigned int flags)
>  {
>  	struct ubifs_info *c = old_dir->i_sb->s_fs_info;
>  	struct inode *old_inode = d_inode(old_dentry);
> @@ -984,6 +985,9 @@ static int ubifs_rename(struct inode *old_dir, struct dentry *old_dentry,
>  	struct timespec time;
>  	unsigned int uninitialized_var(saved_nlink);
>  
> +	if (flags & ~RENAME_NOREPLACE)
> +		return -EINVAL;
> +
>  	/*
>  	 * Budget request settings: deletion direntry, new direntry, removing
>  	 * the old inode, and changing old and new parent directory inodes.
> @@ -1179,7 +1183,7 @@ const struct inode_operations ubifs_dir_inode_operations = {
>  	.mkdir       = ubifs_mkdir,
>  	.rmdir       = ubifs_rmdir,
>  	.mknod       = ubifs_mknod,
> -	.rename      = ubifs_rename,
> +	.rename2     = ubifs_rename,
>  	.setattr     = ubifs_setattr,
>  	.getattr     = ubifs_getattr,
>  	.setxattr    = generic_setxattr,

For UBIFS,
Acked-by: Richard Weinberger <richard@....at>

Thanks,,
//richard

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ