All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Jan Kara <jack@suse.cz>
Cc: Al Viro <viro@ZenIV.linux.org.uk>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-fsdevel@vger.kernel.org,
	Andreas Gruenbacher <agruenba@redhat.com>
Subject: Re: [PATCH v2 RESEND] posix_acl: Clear SGID bit when setting file permissions
Date: Tue, 20 Sep 2016 09:13:24 -0700	[thread overview]
Message-ID: <20160920161324.GA19802@infradead.org> (raw)
In-Reply-To: <1474299768-15150-1-git-send-email-jack@suse.cz>

On Mon, Sep 19, 2016 at 05:42:48PM +0200, Jan Kara wrote:
> When file permissions are modified via chmod(2) and the user is not in
> the owning group or capable of CAP_FSETID, the setgid bit is cleared in
> inode_change_ok().  Setting a POSIX ACL via setxattr(2) sets the file
> permissions as well as the new ACL, but doesn't clear the setgid bit in
> a similar way; this allows to bypass the check in chmod(2).  Fix that.

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>

(although I would have split it into a refactor patch and the actual
fix for clearing the suid bit)

  reply	other threads:[~2016-09-20 16:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-19 15:42 [PATCH v2 RESEND] posix_acl: Clear SGID bit when setting file permissions Jan Kara
2016-09-20 16:13 ` Christoph Hellwig [this message]
2016-09-22  9:10   ` Jan Kara
2016-09-20 16:54 ` Jeff Layton
2016-10-11 23:11 ` Eric Biggers
2016-10-12  7:16   ` Jan Kara
2016-10-12 17:35     ` Eric Biggers
2016-10-12 21:16       ` Dave Chinner
2016-10-12 21:30         ` Eric Biggers

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=20160920161324.GA19802@infradead.org \
    --to=hch@infradead.org \
    --cc=agruenba@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=jack@suse.cz \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.