From: Dave Chinner <david@fromorbit.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>,
linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
"Eric W. Biederman" <ebiederm@xmission.com>,
Seth Forshee <seth.forshee@canonical.com>
Subject: Re: xfs: fix inode uid/gid initialization
Date: Tue, 14 Feb 2017 08:34:16 +1100 [thread overview]
Message-ID: <20170213213416.GA15349@dastard> (raw)
In-Reply-To: <20170213194337.GA9852@infradead.org>
On Mon, Feb 13, 2017 at 11:43:37AM -0800, Christoph Hellwig wrote:
> --- a/fs/xfs/xfs_inode.c
> +++ b/fs/xfs/xfs_inode.c
> @@ -814,18 +814,10 @@ xfs_ialloc(
> if (ip->i_d.di_version == 1)
> ip->i_d.di_version = 2;
>
> - inode->i_mode = mode;
> + inode_init_owner(inode, pip ? VFS_I(pip) : NULL, mode);
> set_nlink(inode, nlink);
> - ip->i_d.di_uid = xfs_kuid_to_uid(current_fsuid());
> - ip->i_d.di_gid = xfs_kgid_to_gid(current_fsgid());
> xfs_set_projid(ip, prid);
>
> - if (pip && XFS_INHERIT_GID(pip)) {
> - ip->i_d.di_gid = pip->i_d.di_gid;
> - if ((VFS_I(pip)->i_mode & S_ISGID) && S_ISDIR(mode))
> - inode->i_mode |= S_ISGID;
> - }
> -
Doesn't this hunk break the "nogrpid" mount option?
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2017-02-13 21:35 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-13 17:46 xfs: fix inode uid/gid initialization James Bottomley
2017-02-13 19:43 ` Christoph Hellwig
2017-02-13 20:33 ` James Bottomley
2017-02-13 21:34 ` Dave Chinner [this message]
2017-02-14 6:08 ` Christoph Hellwig
2017-02-14 6:27 ` James Bottomley
2017-02-14 6:28 ` [PATCH 1/2] fs: add inode helpers for fsuid and fsgid James Bottomley
2017-02-14 7:46 ` Eric W. Biederman
2017-02-14 8:00 ` Christoph Hellwig
2017-02-14 16:09 ` James Bottomley
2017-02-15 2:29 ` Eric W. Biederman
2017-02-16 15:43 ` James Bottomley
2017-02-17 1:15 ` Eric W. Biederman
2017-02-17 17:12 ` James Bottomley
2017-02-20 4:56 ` Eric W. Biederman
2017-02-14 6:29 ` [PATCH 2/2] xfs: fix inode uid/gid initialization James Bottomley
2017-02-14 7:58 ` Christoph Hellwig
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=20170213213416.GA15349@dastard \
--to=david@fromorbit.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=ebiederm@xmission.com \
--cc=hch@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=seth.forshee@canonical.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 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).