From: Mark Tinguely <tinguely@sgi.com>
To: Dave Chinner <david@fromorbit.com>
Cc: Greg Banks <gbanks@sgi.com>, xfs@oss.sgi.com
Subject: Re: [PATCH] xfs: change the immutable in xfs_open_by_handle
Date: Tue, 10 Sep 2013 17:29:49 -0500 [thread overview]
Message-ID: <522F9D5D.1090005@sgi.com> (raw)
In-Reply-To: <20130910212002.GB19103@dastard>
On 09/10/13 16:20, Dave Chinner wrote:
> On Tue, Sep 10, 2013 at 01:47:20PM -0500, Mark Tinguely wrote:
>> This patch allows clients like DMF to modify an immutable file
>> without changing the immutable capability on the file, which
>> would expose the file to change.
>>
>> This patch is restricted to holders of the CAP_LINUX_IMMUTABLE,
>> so no addition security risk has been introduced.
>>
>> Signed-off-by: Greg Banks <gbanks@sgi.com>
>> Singed-off-by: Mark Tinguely <tinguely@sgi.com>
>> ---
>> fs/xfs/xfs_ioctl.c | 4 +++-
>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> Index: b/fs/xfs/xfs_ioctl.c
>> ===================================================================
>> --- a/fs/xfs/xfs_ioctl.c
>> +++ b/fs/xfs/xfs_ioctl.c
>> @@ -237,7 +237,9 @@ xfs_open_by_handle(
>> goto out_dput;
>> }
>>
>> - if ((fmode & FMODE_WRITE) && IS_IMMUTABLE(inode)) {
>> + if ((permflag & FMODE_WRITE)&&
>
> Why the conversion from fmode to permflag? At minimum, this will
> probably throw sparse warnings for comparing a FMODE_* flag against
> a variable that is not a fmode_t....
>
> Cheers,
>
> Dave.
Yes, my mistake - a case of posting a Linux 3.0.X based patch.
--Mark.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2013-09-10 22:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-10 18:47 [PATCH] xfs: change the immutable in xfs_open_by_handle Mark Tinguely
2013-09-10 21:20 ` Dave Chinner
2013-09-10 22:29 ` Mark Tinguely [this message]
2013-09-11 13:55 ` Christoph Hellwig
2013-09-11 14:22 ` Mark Tinguely
2013-09-11 15:50 ` Matthias Schniedermeyer
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=522F9D5D.1090005@sgi.com \
--to=tinguely@sgi.com \
--cc=david@fromorbit.com \
--cc=gbanks@sgi.com \
--cc=xfs@oss.sgi.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