From: "Serge E. Hallyn" <serge@hallyn.com>
To: samsonov@krista.ru
Cc: linux-kernel@vger.kernel.org
Subject: Re: fs/attr.c patch
Date: Thu, 19 May 2011 09:50:04 -0500 [thread overview]
Message-ID: <20110519145004.GA15698@mail.hallyn.com> (raw)
In-Reply-To: <20110519155702.38a0481d@wks1198.krista.ru>
But you're removing the ability for a process with CAP_CHOWN to
chgrp all files.
You also change behavior (which may be wrong) when doing chgrp to
which would cause no change but the group is not in_group_p(),
which might break current users.
Quoting samsonov@krista.ru (samsonov@krista.ru):
> --- ./linux-2.6.33.4.orig/fs/attr.c 2010-05-13 02:04:27.000000000 +0400
> +++ ./linux-2.6.33.4/fs/attr.c 2011-05-19 15:43:14.533672804 +0400
> @@ -35,9 +35,7 @@
>
> /* Make sure caller can chgrp. */
> if ((ia_valid & ATTR_GID) &&
> - (current_fsuid() != inode->i_uid ||
> - (!in_group_p(attr->ia_gid) && attr->ia_gid != inode->i_gid)) &&
> - !capable(CAP_CHOWN))
> + !(in_group_p(attr->ia_gid) && is_owner_or_cap(inode)))
> goto error;
>
> /* Make sure a caller can chmod. */
>
> I think that fileowner can change group of file.
>
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
prev parent reply other threads:[~2011-05-19 14:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-19 11:57 fs/attr.c patch samsonov
2011-05-19 14:50 ` Serge E. Hallyn [this message]
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=20110519145004.GA15698@mail.hallyn.com \
--to=serge@hallyn.com \
--cc=linux-kernel@vger.kernel.org \
--cc=samsonov@krista.ru \
/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