From mboxrd@z Thu Jan 1 00:00:00 1970 From: Miklos Szeredi Subject: Re: [PATCH 03/11] fs: Allow superblock owner to change ownership of inodes Date: Tue, 13 Feb 2018 14:18:21 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Dongsu Park Cc: Kees Cook , containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, lkml , Seth Forshee , "Luis R. Rodriguez" , Alban Crequy , "Eric W . Biederman" , Sargun Dhillon , linux-fsdevel , Alexander Viro List-Id: containers.vger.kernel.org On Fri, Dec 22, 2017 at 3:32 PM, Dongsu Park wrote: > From: Eric W. Biederman > > Allow users with CAP_SYS_CHOWN over the superblock of a filesystem to > chown files. Ordinarily the capable_wrt_inode_uidgid check is > sufficient to allow access to files but when the underlying filesystem > has uids or gids that don't map to the current user namespace it is > not enough, so the chown permission checks need to be extended to > allow this case. > > Calling chown on filesystem nodes whose uid or gid don't map is > necessary if those nodes are going to be modified as writing back > inodes which contain uids or gids that don't map is likely to cause > filesystem corruption of the uid or gid fields. How can the filesystem be corrupted if chown is denied? It is not clear to me what the purpose of this patch is or what the exact usecase this is fixing. Thanks, Miklos